Long time Nagios user here, and I tend to push the configuration with lots of shortcuts and tricks. However, I think I might've pushed too far and uncovered a bug
This is tested on Nagios Core 3.5.1.
How to reproduce:
Define a service template assigned to two or more hostgroups with any number of hosts contained within the host groups.
Code: Select all
define service {
name test-template
register 0
hostgroup_name hostgroup1,hostgroup2
}
Code: Select all
define someservice {
use test-template
host_name !somegroup1host,!somegroup2host
service_description Just-fooling-around
check_command some_check!derp
}
The above does not work, the configuration check will fail saying it "cannot expand hosts". Even though via the register 0 entry should be applying to all hosts in both groups, trying to negate a service using the template with one "host_name" line containing hosts from *both* groups will fail. If you limit the host_name entries to one group *or* another, the configuration passes.
This looks like a bug to me. Can anyone else verify this behavior to ensure it's simply not something to do with my configuration technique?