Page 1 of 1

[Nagios-devel] multi-line regex host exceptions silently ignored

Posted: Wed Jun 04, 2008 2:37 pm
by Guest

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=3D1
use_true_regexp_matching=3D0

Anyway, thought I'd point this out.

Thanks

Mark





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]