Page 1 of 1

Where do these duplicates service definitions come from?

Posted: Wed Nov 23, 2011 1:48 am
by TSCAdmin
Every now and then I see messages like the following while Nagios does pre-flight checks:

Code: Select all

Warning: Duplicate definition found for service 'SERVICE-X' on host 'srv-svv-0192' (config file '/usr/local/nagios/etc/services/srv-svv-0192.cfg', starting on line 107)
Warning: Duplicate definition found for service 'SERVICE-X' on host 'srv-svv-0170' (config file '/usr/local/nagios/etc/services/srv-svv-0170.cfg', starting on line 107)
Warning: Duplicate definition found for service 'SERVICE-X' on host 'srv-svv-0183' (config file '/usr/local/nagios/etc/services/srv-svv-0183.cfg', starting on line 107)
Warning: Duplicate definition found for service 'SERVICE-X' on host 'srv-svv-0185' (config file '/usr/local/nagios/etc/services/srv-svv-0185.cfg', starting on line 107)
Warning: Duplicate definition found for service 'SERVICE-X' on host 'srv-svv-0189' (config file '/usr/local/nagios/etc/services/srv-svv-0189.cfg', starting on line 107)
Warning: Duplicate definition found for service 'SERVICE-X' on host 'srv-svv-0180' (config file '/usr/local/nagios/etc/services/srv-svv-0180.cfg', starting on line 107)
..... any many more
I have to delete them manually all the time. I was wondering where do they come from? Is there any way to prevent them from reoccuring?

Thanks

Re: Where do these duplicates service definitions come from?

Posted: Wed Nov 23, 2011 11:06 am
by mguthrie
The most common reason for this is that a host -> service relationship is established in both a host definition, and a hostgroup definition, or multiple hostgroup->service assignments which cause certain hosts to overlap. It doesn't break anything to have these duplications, it just more of a heads up for having clean config files.