Page 1 of 1

Configured server not displayed in web interface

Posted: Mon Apr 22, 2024 10:31 am
by MxR57
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.

Re: Configured server not displayed in web interface

Posted: Tue Apr 23, 2024 1:16 pm
by bbahn
Hello MxR57,

Can you run

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
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.

Re: Configured server not displayed in web interface

Posted: Tue Apr 23, 2024 2:29 pm
by MxR57
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.

Re: Configured server not displayed in web interface

Posted: Fri May 03, 2024 10:28 am
by MxR57
* 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!

Re: Configured server not displayed in web interface

Posted: Tue May 07, 2024 10:24 am
by bbahn
Thanks for letting us know that this has been resolved. I will now lock this thread.