Greetings,
This is my first time in forum and posting a question, so I apologies in advance if I am not following the forum protocols for posting questions.
Using Nagios Core 4.4.6, once a day we rebuild server_hosts.cfg that includes all the existing operational/active servers. We also rebuild server_hostgroups.cfg based on the properties of the servers in server_hosts.cfg. Finally, we restart Nagios that will use the newly build config files. However, when we bring up the web api, 8 of the newly configured servers are not displayed. They are in both server_hosts.cfg and server_hostgroups.cfg files.
Thanks in advance for helping me solve this.
Configured server not displayed in web interface
Re: Configured server not displayed in web interface
Hello MxR57,
Can you run to see if Nagios Core thinks your configuration is good?
You can also check the permissions of your configuration file with ls -l and check /var/log/nagios/nagios.log to see if Nagios Core is running into any errors. It may also contain other diagnostic information that could help.
Can you run
Code: Select all
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
You can also check the permissions of your configuration file with ls -l and check /var/log/nagios/nagios.log to see if Nagios Core is running into any errors. It may also contain other diagnostic information that could help.
Actively advancing awesome answers with ardent alliteration, aptly addressing all ambiguities. Amplify your acumen and avail our amicable assistance. Eagerly awaiting your astute assessments of our advice.
Re: Configured server not displayed in web interface
Thanks for your reply. Here is verifying the nagios.cfg:
sh-4.2$ /usr/sbin/nagios -v /etc/nagios/nagios.cfg
Nagios Core 4.4.6
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2020-04-28
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Read object config files okay...
Running pre-flight check on configuration data...
Checking objects...
Checked 32874 services.
Checked 2128 hosts.
Checked 83 host groups.
Checked 14 service groups.
Checked 8 contacts.
Checked 8 contact groups.
Checked 67 commands.
Checked 5 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 2128 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 5 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
I am not sure what you mean about Nagios running! From GUI API I have:
Nagios Process Information
Last Updated: Tue Apr 23 19:18:56 UTC 2024
Updated every 90 seconds
Nagios® Core™ 4.4.6 - www.nagios.org
Logged in as nagiosadmin
and
Program Version: 4.4.6
Program Start Time: 04-23-2024 12:17:08
Total Running Time: 0d 7h 1m 48s
Last Log File Rotation: N/A
Nagios PID 10
and I see all the servers in the GUI except the new ones that were added.
sh-4.2$ /usr/sbin/nagios -v /etc/nagios/nagios.cfg
Nagios Core 4.4.6
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2020-04-28
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Read object config files okay...
Running pre-flight check on configuration data...
Checking objects...
Checked 32874 services.
Checked 2128 hosts.
Checked 83 host groups.
Checked 14 service groups.
Checked 8 contacts.
Checked 8 contact groups.
Checked 67 commands.
Checked 5 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 2128 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 5 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
I am not sure what you mean about Nagios running! From GUI API I have:
Nagios Process Information
Last Updated: Tue Apr 23 19:18:56 UTC 2024
Updated every 90 seconds
Nagios® Core™ 4.4.6 - www.nagios.org
Logged in as nagiosadmin
and
Program Version: 4.4.6
Program Start Time: 04-23-2024 12:17:08
Total Running Time: 0d 7h 1m 48s
Last Log File Rotation: N/A
Nagios PID 10
and I see all the servers in the GUI except the new ones that were added.
Re: Configured server not displayed in web interface
* SOLVED *
We build the Nagios config files on a development server once a day and put them on a NAS Shared File System and if there are any changes, Nagios instance running on a production server restarts and uses the created config files from NAS Shared File System. Starting a few weeks ago, the production server was mounting an older NAS Shared File System that did not have new config files!
We build the Nagios config files on a development server once a day and put them on a NAS Shared File System and if there are any changes, Nagios instance running on a production server restarts and uses the created config files from NAS Shared File System. Starting a few weeks ago, the production server was mounting an older NAS Shared File System that did not have new config files!
Re: Configured server not displayed in web interface
Thanks for letting us know that this has been resolved. I will now lock this thread.
Actively advancing awesome answers with ardent alliteration, aptly addressing all ambiguities. Amplify your acumen and avail our amicable assistance. Eagerly awaiting your astute assessments of our advice.