Changes to nagios config nto taking effect on nagios webadmi

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
sahasra
Posts: 9
Joined: Tue Jan 28, 2020 5:12 am

Changes to nagios config nto taking effect on nagios webadmi

Post by sahasra »

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.
User avatar
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

Post by Box293 »

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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
sahasra
Posts: 9
Joined: Tue Jan 28, 2020 5:12 am

Re: Changes to nagios config nto taking effect on nagios web

Post by sahasra »

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
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Changes to nagios config nto taking effect on nagios web

Post by tgriep »

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.

Code: Select all

/usr/local/nagios/bin/nagios -vv /usr/local/nagios/etc/nagios.cfg
Be sure to check out our Knowledgebase for helpful articles and solutions!
sahasra
Posts: 9
Joined: Tue Jan 28, 2020 5:12 am

Re: Changes to nagios config nto taking effect on nagios web

Post by sahasra »

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
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Changes to nagios config nto taking effect on nagios web

Post by tgriep »

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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
sahasra
Posts: 9
Joined: Tue Jan 28, 2020 5:12 am

Re: Changes to nagios config nto taking effect on nagios web

Post by sahasra »

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.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Changes to nagios config nto taking effect on nagios web

Post by tgriep »

Run this as root to stop the nagios process and kill off and other processes and then start it up.

Code: Select all

service nagios stop
killall -9 nagios
pkill -9 -u nagios
service nagios start
See if the date time stamps update on the files.
If not, I recommend updating Core to the latest version.
Be sure to check out our Knowledgebase for helpful articles and solutions!
sahasra
Posts: 9
Joined: Tue Jan 28, 2020 5:12 am

Re: Changes to nagios config nto taking effect on nagios web

Post by sahasra »

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
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

Post by benjaminsmith »

Hello,
Thank you so much. The above steps worked.
Great. Did you have any other questions or may we close this thread?
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!
Locked