multi-line regex host exceptions silently ignored

Frost, Mark {PBG} mark.frost1 at pepsi.com
Wed Jun 4 23:22:58 CEST 2008


While setting up some services using hostgroups and the host exceptions,
I noticed an unexpected behavior today.

When I had

	define service {
        hostgroup_name  my_host_group
        host_name      !host_a, !host_b, !host_c
        host_name      !host_d, !host_e, !host_f
        host_name      !host_g
	...
	}

all exceptions except the very last one were ignored.  That is, the
actual checked host list was "my_host_group - host_g".  What was
unexpected to me was that the pre-flight check did not balk at my
multi-line host_name definitions.  If I had done something wrong, I
expected an error or warning.

But then if I changed the host_name line to have a single line of
exceptions, things worked as I expected where all excepted hosts did not
run the check.

	define service {
	        hostgroup_name  my_host_group
	        host_name      !host_a, !host_b, !host_c, !host_d,
!host_e, !host_f, !host_g
	...
	}

I'm running Nagios 3.0.1.  In my nagios.cfg I have

	use_regexp_matching=1
	use_true_regexp_matching=0

Anyway, thought I'd point this out.

Thanks

Mark

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php




More information about the Developers mailing list