Apply configuration still doesn't work

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Frédéric GRANAT
Posts: 445
Joined: Mon Nov 19, 2012 11:36 am

Apply configuration still doesn't work

Post by Frédéric GRANAT »

Hi,
I'm sorry but Apply configuration still doesn't work.
When I decided to close the previous topic, I forgot that changing cfg files + restart nagios service worked but not "Apply configuration"

I need to my make my changes in cfg files and restart nagios service in order the changes are taken into account.

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg gives :

Warning: Duplicate definition found for service 'Drives : Disk Usage' on host 'W2K-TEST02.cg.ahp' (config file '/usr/local/nagios/etc/services/W2K-TEST02.cg.ahp.cfg', starting on line 21)
Read object config files okay...

Running pre-flight check on configuration data...

Checking services...
Checked 570 services.
Checking hosts...
Checked 228 hosts.
Checking host groups...
Checked 6 host groups.
Checking service groups...
Checked 7 service groups.
Checking contacts...
Checked 4 contacts.
Checking contact groups...
Checked 3 contact groups.
Checking service escalations...
Checked 0 service escalations.
Checking service dependencies...
Checked 0 service dependencies.
Checking host escalations...
Checked 0 host escalations.
Checking host dependencies...
Checked 0 host dependencies.
Checking commands...
Checked 137 commands.
Checking time periods...
Checked 10 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check

Please help me

Frederic
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Apply configuration still doesn't work

Post by scottwilkerson »

Can you please run the following and post back results

Code: Select all

grep -R "W2K-TEST02.cg.ahp" /usr/local/nagios/etc |grep "Disk Usage"
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Frédéric GRANAT
Posts: 445
Joined: Mon Nov 19, 2012 11:36 am

Re: Apply configuration still doesn't work

Post by Frédéric GRANAT »

Hi,

Code: Select all

[root@nagiosxi ~]# grep -R "W2K-TEST02.cg.ahp" /usr/local/nagios/etc |grep "Disk Usage"
/usr/local/nagios/etc/servicegroups.cfg:                                       Drives : Disk Usage,W2K8-NOTES02.cg.ahp,Memory Usage,W2K8-NOTES02.cg.ahp,Services,W2K8-NOTES02.cg.ahp,Uptime,W2K8-NOTES03.cg.ahp,CPU Usage,W2K8-NOTES03.cg.ahp,Drives : Disk Usage,W2K8-NOTES03.cg.ahp,Memory Usage,W2K8-NOTES03.cg.ahp,Services,W2K8-NOTES03.cg.ahp,Uptime,W2K8-WEB22.cg.ahp,CPU Usage,W2K8-WEB22.cg.ahp,Drives : Disk Usage,W2K8-WEB22.cg.ahp,Memory Usage,W2K8-WEB22.cg.ahp,Services,W2K8-WEB22.cg.ahp,Uptime,W2K-PROGR22-PP.cg.ahp,CPU Usage,W2K-PROGR22-PP.cg.ahp,Drives : Disk Usage,W2K-PROGR22-PP.cg.ahp,Memory Usage,W2K-PROGR22-PP.cg.ahp,Services,W2K-PROGR22-PP.cg.ahp,Uptime,W2K-TEST02.cg.ahp,CPU Usage,W2K-TEST02.cg.ahp,Drives : Disk Usage,W2K-TEST02.cg.ahp,Memory Usage,W2K-TEST02.cg.ahp,Services,W2K-TEST02.cg.ahp,Uptime,W2K-TEST13.cg.ahp,CPU Usage,W2K-TEST13.cg.ahp,Memory Usage,W2K-TEST13.cg.ahp,\
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Apply configuration still doesn't work

Post by lmiltchev »

I see "Drives : Disk Usage" on "W2K-TEST02.cg.ahp" listed only once - not sure where the "Duplicate definition" comes from. It's just a warning, not an error, so it may not even be the reason why apply configuration doesn't work.

Run the following commands:

Code: Select all

cd /usr/local/nagiosxi/scripts
./reconfigure_nagios.sh &> reconfig.txt
Then also run the following command to begin capturing log output:

Code: Select all

tail -f /usr/local/nagiosxi/var/cmdsubsys.log &> cmd.txt
Attempt to Apply Configuration from the web interface. After the browser has returned some output to the screen, press Ctrl+C to stop the log tail, and post cmd.txt file and the reconfig.txt that was generated by the above instructions.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Frédéric GRANAT
Posts: 445
Joined: Mon Nov 19, 2012 11:36 am

Re: Apply configuration still doesn't work

Post by Frédéric GRANAT »

Hi,
Thanks for that debug method.
I found the problem and now Apply configuration works.

You can close the topic

Frederic
Locked