After adding and modifying various hosts I have been trying to apply my configuration and getting a duplicate service failure.
For some reason a service that we deleted keeps re-appearing and causing an error.
One of the MANY errors looks like the following: (they are all similar in nature just different hosts)
Warning: Duplicate definition found for service 'PING' on host 'VPN-LA-Argentina-ASA-Lan' (config file '/usr/local/nagios/etc/services/LA-DEVICES-Ping.cfg', starting on line 14)
Warning: Duplicate definition found for service 'PING' on host 'EVPN-LA-PDQFL01R-l' (config file '/usr/local/nagios/etc/services/la-devices-ping.cfg', starting on line 14)
The REAL service is called la-devices-ping.cfg. the incorrect one is LA-DEVICES-Ping.cfg and this was DELTED yet it keeps reappearing when I do the apply and get the error messages.
If I manually delete the LA-DEVICES-Ping.cfg file and re-run apply configuration the error will go away the first time. However, if I reapply configuration again it reappears and gives all the errors.
Sytem specifics:
Linux: Red Hat Enterprise Linux Server release 5.6
uname -a
Linux nagxi.xxxxxxxx.com 2.6.18-238.9.1.el5 #1 SMP Fri Mar 18 12:42:39 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
Nagios XI: Installed Version:2009R1.4B
Thank you in advance.
Deleted service keeps getting recreated causing failure
Re: Deleted service keeps getting recreated causing failure
This could be a bug in NagiosQL (used for the Core config manager). Try these steps and see if they resolve the problem
1. When you're in the CCM, edit the service that you're having problems with and make sure the "config name" name field is set to use the lowercase host name (la-devices-ping).
2. Delete the (uppercase) LA-DEVICES-Ping.cfg file
3. Try applying the configuration
Let us know what happens.
1. When you're in the CCM, edit the service that you're having problems with and make sure the "config name" name field is set to use the lowercase host name (la-devices-ping).
2. Delete the (uppercase) LA-DEVICES-Ping.cfg file
3. Try applying the configuration
Let us know what happens.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Ethan Galstad
President
Ethan Galstad
President
Re: Deleted service keeps getting recreated causing failure
I deleted the LA-DEVICES-PING file and now the directory shows the following:
[root@nagxi services]# pwd
/usr/local/nagios/etc/services
[root@nagxi services]# ll
total 48
-rw-rw-r-- 1 apache nagios 852 Jun 9 11:32 BCAA-Port.cfg
-rw-rw-r-- 1 apache nagios 1185 Jun 9 11:32 ciscam-dns-check.cfg
-rw-rw-r-- 1 apache nagios 1466 Jun 9 11:32 common-ping.cfg
-rw-rw-r-- 1 apache nagios 1151 Jun 9 11:32 Extended-DMZ-ping.cfg
-rw-rw-r-- 1 apache nagios 1325 Jun 9 11:32 External-ISP-ping.cfg
-rw-rw-r-- 1 apache nagios 1160 Jun 9 11:32 External-Proxy-ping.cfg
-rw-rw-r-- 1 apache nagios 788 Jun 9 11:32 FTP-Port.cfg
-rw-rw-r-- 1 apache nagios 1200 Jun 9 11:32 la-devices-ping.cfg
-rw-rw-r-- 1 apache nagios 1875 Jun 9 11:32 localhost.cfg
-rw-rw-r-- 1 apache nagios 1148 Jun 9 11:32 na-vpn-ping.cfg
-rw-rw-r-- 1 apache nagios 1176 Jun 9 11:32 SMTP.cfg
-rw-rw-r-- 1 apache nagios 1150 Jun 9 11:32 smtp-ping.cfg
When I do "apply configuration" it reappears even though it is not listed in the NagXI gui under services.
[root@nagxi services]# ll
total 52
-rw-rw-r-- 1 apache nagios 852 Jun 9 11:32 BCAA-Port.cfg
-rw-rw-r-- 1 apache nagios 1185 Jun 9 11:32 ciscam-dns-check.cfg
-rw-rw-r-- 1 apache nagios 1466 Jun 9 11:32 common-ping.cfg
-rw-rw-r-- 1 apache nagios 1151 Jun 9 11:32 Extended-DMZ-ping.cfg
-rw-rw-r-- 1 apache nagios 1325 Jun 9 11:32 External-ISP-ping.cfg
-rw-rw-r-- 1 apache nagios 1160 Jun 9 11:32 External-Proxy-ping.cfg
-rw-rw-r-- 1 apache nagios 788 Jun 9 11:32 FTP-Port.cfg
-rw-rw-r-- 1 apache nagios 1200 Jun 9 11:32 la-devices-ping.cfg
-rw-rw-r-- 1 apache nagios 1200 May 5 15:02 LA-DEVICES-Ping.cfg
-rw-rw-r-- 1 apache nagios 1875 Jun 9 11:32 localhost.cfg
-rw-rw-r-- 1 apache nagios 1148 Jun 9 11:32 na-vpn-ping.cfg
-rw-rw-r-- 1 apache nagios 1176 Jun 9 11:32 SMTP.cfg
-rw-rw-r-- 1 apache nagios 1150 Jun 9 11:32 smtp-ping.cfg
[root@nagxi services]# pwd
/usr/local/nagios/etc/services
[root@nagxi services]# ll
total 48
-rw-rw-r-- 1 apache nagios 852 Jun 9 11:32 BCAA-Port.cfg
-rw-rw-r-- 1 apache nagios 1185 Jun 9 11:32 ciscam-dns-check.cfg
-rw-rw-r-- 1 apache nagios 1466 Jun 9 11:32 common-ping.cfg
-rw-rw-r-- 1 apache nagios 1151 Jun 9 11:32 Extended-DMZ-ping.cfg
-rw-rw-r-- 1 apache nagios 1325 Jun 9 11:32 External-ISP-ping.cfg
-rw-rw-r-- 1 apache nagios 1160 Jun 9 11:32 External-Proxy-ping.cfg
-rw-rw-r-- 1 apache nagios 788 Jun 9 11:32 FTP-Port.cfg
-rw-rw-r-- 1 apache nagios 1200 Jun 9 11:32 la-devices-ping.cfg
-rw-rw-r-- 1 apache nagios 1875 Jun 9 11:32 localhost.cfg
-rw-rw-r-- 1 apache nagios 1148 Jun 9 11:32 na-vpn-ping.cfg
-rw-rw-r-- 1 apache nagios 1176 Jun 9 11:32 SMTP.cfg
-rw-rw-r-- 1 apache nagios 1150 Jun 9 11:32 smtp-ping.cfg
When I do "apply configuration" it reappears even though it is not listed in the NagXI gui under services.
[root@nagxi services]# ll
total 52
-rw-rw-r-- 1 apache nagios 852 Jun 9 11:32 BCAA-Port.cfg
-rw-rw-r-- 1 apache nagios 1185 Jun 9 11:32 ciscam-dns-check.cfg
-rw-rw-r-- 1 apache nagios 1466 Jun 9 11:32 common-ping.cfg
-rw-rw-r-- 1 apache nagios 1151 Jun 9 11:32 Extended-DMZ-ping.cfg
-rw-rw-r-- 1 apache nagios 1325 Jun 9 11:32 External-ISP-ping.cfg
-rw-rw-r-- 1 apache nagios 1160 Jun 9 11:32 External-Proxy-ping.cfg
-rw-rw-r-- 1 apache nagios 788 Jun 9 11:32 FTP-Port.cfg
-rw-rw-r-- 1 apache nagios 1200 Jun 9 11:32 la-devices-ping.cfg
-rw-rw-r-- 1 apache nagios 1200 May 5 15:02 LA-DEVICES-Ping.cfg
-rw-rw-r-- 1 apache nagios 1875 Jun 9 11:32 localhost.cfg
-rw-rw-r-- 1 apache nagios 1148 Jun 9 11:32 na-vpn-ping.cfg
-rw-rw-r-- 1 apache nagios 1176 Jun 9 11:32 SMTP.cfg
-rw-rw-r-- 1 apache nagios 1150 Jun 9 11:32 smtp-ping.cfg
Re: Deleted service keeps getting recreated causing failure
Can you try the following steps and see if it resolves your issue.
From the command-line:
killall -9 nagios
Then manually delete both of the LA-DEVICES service config files. And
then go to the Core Config Manager->Tools->Write Config Files, and
manually write the DB configs to file and restart nagios.
If that doesn't resolve the issue let us know.
From the command-line:
killall -9 nagios
Then manually delete both of the LA-DEVICES service config files. And
then go to the Core Config Manager->Tools->Write Config Files, and
manually write the DB configs to file and restart nagios.
If that doesn't resolve the issue let us know.
Re: Deleted service keeps getting recreated causing failure
what I had to do was to delete "both" of the services" and recreate a new one with a different name. I was able to apply the configuration but the files that I deleted are still being created under /usr/local/nagios/etc/services
This occurs even though I have deleted these using the GUI.
This occurs even though I have deleted these using the GUI.
Re: Deleted service keeps getting recreated causing failure
My guess is that there's still some sort of database relationship that's causing those files to reappear. Can you send us a configuration snapshot tarball from your Configure->Core Config Manager->Configuration Snapshots page? Send it to [email protected].