Page 1 of 1

Apply configuration still doesn't work

Posted: Tue Jul 09, 2013 8:47 am
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

Re: Apply configuration still doesn't work

Posted: Tue Jul 09, 2013 10:07 am
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"

Re: Apply configuration still doesn't work

Posted: Wed Jul 10, 2013 8:42 am
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,\

Re: Apply configuration still doesn't work

Posted: Wed Jul 10, 2013 10:43 am
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.

Re: Apply configuration still doesn't work

Posted: Thu Jul 11, 2013 2:03 am
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