Page 2 of 2
Re: service override via nested hostgroup - only last host w
Posted: Tue May 19, 2015 2:05 pm
by jdalrymple
The bug has been filed - and I can update the thread once the problem is resolved. This thread is noted in the bug report. Even still, I cannot offer any sort of ETA. The developers get to prioritize problems as they see fit. Your problem has an easy workaround so I wouldn't get my hopes up too high for a quick turnaround.
Incidentally this is a Nagios Core issue, not an XI issue. With that it's an issue that *could* be resolved by the community, if you know any good C developers feel free to get them involved.
Re: service override via nested hostgroup - only last host w
Posted: Fri May 22, 2015 1:16 pm
by jdalrymple
Another viable and perhaps better workaround than not using hostgroups attached to parent services at all - in the parent service specify "!nestedhostgroup" in the hostgroups directive then your nested service will be applied. The thing to keep in mind is that none of the parent directives will be applied so they'll all have to be respecified in the one you want to "overwrite" with.
Re: service override via nested hostgroup - only last host w
Posted: Wed Dec 14, 2016 4:07 pm
by jfrickson
The code is
not designed to override one service definition with another. In fact, it give you a warning, such as this:
Code: Select all
Warning: Duplicate definition found for service 'simple-service' on host 'simple-host-c' (config file '/usr/local/nagios/etc/objects/issue_278.cfg', starting on line 32)
How everything works depends on the order in which the various object are processed, and the fact that it works at all is pretty much an accident. Using the definitions given up-thread, I was able to get things "correct" by reversing the order in which the services are defined, i.e. define
simple-service-nest before simple-service. But be aware that processing order could change in the future.