Changes to nagios config nto taking effect on nagios webadmi
Changes to nagios config nto taking effect on nagios webadmi
Hi ,
We have Nagios core 4.4.1 installed and running for the past 1 year and it is monitoring few windows machine for diskspace,memory etc.
We have added a new windows configuration and verified the configuration using the command below and there are no errors but the Nagios webadmin host list is not showing this windows machine even after restart of Nagios and reboot of nagios server. Windows machine NSCLient++ installed,configured and running.
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Then we just removed couple of windows machines check from Nagios.cfg and restart Nagios. Nagios web admins till showing those hosts.
So looks like any changes are getting reflected on web admin.
PLease advise..
Thanks,
Sahasra.
We have Nagios core 4.4.1 installed and running for the past 1 year and it is monitoring few windows machine for diskspace,memory etc.
We have added a new windows configuration and verified the configuration using the command below and there are no errors but the Nagios webadmin host list is not showing this windows machine even after restart of Nagios and reboot of nagios server. Windows machine NSCLient++ installed,configured and running.
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Then we just removed couple of windows machines check from Nagios.cfg and restart Nagios. Nagios web admins till showing those hosts.
So looks like any changes are getting reflected on web admin.
PLease advise..
Thanks,
Sahasra.
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Changes to nagios config nto taking effect on nagios web
You may have multiple nagios processes running.
Can you please follow this guide, under the section "Check For Multiple Nagios Processes":
https://support.nagios.com/kb/article.php?id=19
Even though the guide is for Nagios XI the same applies for Nagios Core.
Can you please follow this guide, under the section "Check For Multiple Nagios Processes":
https://support.nagios.com/kb/article.php?id=19
Even though the guide is for Nagios XI the same applies for Nagios Core.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Changes to nagios config nto taking effect on nagios web
Only single Nagios process running
nagios 4707 1 0 Jan22 ? 00:03:52 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios 4726 4707 0 Jan22 ? 00:00:59 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios 4707 1 0 Jan22 ? 00:03:52 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios 4726 4707 0 Jan22 ? 00:00:59 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
Re: Changes to nagios config nto taking effect on nagios web
Can you post your /usr/local/nagios/etc/nagios.cfg file and the location of where the cfg files are for the new host and also, the names and locations of the hosts that were removed?
Please run the verbose output of the verification and post the output here. Notice the 2 v's.
Please run the verbose output of the verification and post the output here. Notice the 2 v's.
Code: Select all
/usr/local/nagios/bin/nagios -vv /usr/local/nagios/etc/nagios.cfgBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: Changes to nagios config nto taking effect on nagios web
Hi,
The config files are in /usr/local/nagios/etc/objects and the new windows host added is CIMTONE.cfg and the ones, we have removed are CI_PGC_PROD_114.cfg and CI_NCL_PROD_116.cfg.
Here is the verbose result below:
[root@CI-NagiosNOC ~]# /usr/local/nagios/bin/nagios -vv /usr/local/nagios/etc/nagios.cfg
Nagios Core 4.4.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2018-06-25
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config file '/usr/local/nagios/etc/objects/commands.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/contacts.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/timeperiods.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/templates.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/localhost.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/CI_64MS_101.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/CI_64MS_104.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/CI_64MS_99.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/CI_PGC_PROD_112.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/CI_NCL_PROD_115.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/CI-PD-PROD-102.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/CI-PERDUE-103.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/CI-MHOST-1.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/CIELI_BLU_39.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/CIELI_BLU_40.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/CI-PD-PROD-105.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/CI_PGC_PROD_113.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/CI_NCL_110.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/CIMTONE.cfg'...
Read object config files okay...
Running pre-flight check on configuration data...
Checking objects...
Checked 44 services.
Checked 15 hosts.
Checked 1 host groups.
Checked 0 service groups.
Checked 8 contacts.
Checked 1 contact groups.
Checked 53 commands.
Checked 6 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 15 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 6 timeperiods
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
The config files are in /usr/local/nagios/etc/objects and the new windows host added is CIMTONE.cfg and the ones, we have removed are CI_PGC_PROD_114.cfg and CI_NCL_PROD_116.cfg.
Here is the verbose result below:
[root@CI-NagiosNOC ~]# /usr/local/nagios/bin/nagios -vv /usr/local/nagios/etc/nagios.cfg
Nagios Core 4.4.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2018-06-25
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config file '/usr/local/nagios/etc/objects/commands.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/contacts.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/timeperiods.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/templates.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/localhost.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/CI_64MS_101.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/CI_64MS_104.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/CI_64MS_99.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/CI_PGC_PROD_112.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/CI_NCL_PROD_115.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/CI-PD-PROD-102.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/CI-PERDUE-103.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/CI-MHOST-1.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/CIELI_BLU_39.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/CIELI_BLU_40.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/CI-PD-PROD-105.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/CI_PGC_PROD_113.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/CI_NCL_110.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/CIMTONE.cfg'...
Read object config files okay...
Running pre-flight check on configuration data...
Checking objects...
Checked 44 services.
Checked 15 hosts.
Checked 1 host groups.
Checked 0 service groups.
Checked 8 contacts.
Checked 1 contact groups.
Checked 53 commands.
Checked 6 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 15 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 6 timeperiods
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
Re: Changes to nagios config nto taking effect on nagios web
Go to the /usr/local/nagios/var folder and look at the objects.cache and the retention.dat and status.dat file and note the date - time stamp.
Restart the nagios process. Did the date and time changed on those files?
They hold the current configs and the status on the checks so they should update when nagios is restarted.
Another question, do you have any brokers setup in nagios like ndoutils, livestatus, Gearman, etc?
Restart the nagios process. Did the date and time changed on those files?
They hold the current configs and the status on the checks so they should update when nagios is restarted.
Another question, do you have any brokers setup in nagios like ndoutils, livestatus, Gearman, etc?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Changes to nagios config nto taking effect on nagios web
Hi,
I don't see the timestamp change happening for objects.cache and retention.dat file after restarting Nagios but can the timestamp changing for status.dat file. No brokers setup.
I don't see the timestamp change happening for objects.cache and retention.dat file after restarting Nagios but can the timestamp changing for status.dat file. No brokers setup.
Re: Changes to nagios config nto taking effect on nagios web
Run this as root to stop the nagios process and kill off and other processes and then start it up.
See if the date time stamps update on the files.
If not, I recommend updating Core to the latest version.
Code: Select all
service nagios stop
killall -9 nagios
pkill -9 -u nagios
service nagios startIf not, I recommend updating Core to the latest version.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Changes to nagios config nto taking effect on nagios web
Thank you so much. The above steps worked.
Can now see new host added and the ones removed not getting listed on the web admin
Can now see new host added and the ones removed not getting listed on the web admin
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Changes to nagios config nto taking effect on nagios web
Hello,
Great. Did you have any other questions or may we close this thread?Thank you so much. The above steps worked.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!