Configuration Files Not Updating

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
wneville
Posts: 59
Joined: Wed Mar 31, 2021 3:35 pm

Configuration Files Not Updating

Post by wneville »

Hello,

We are running nagios 5.8.7 on RHEL 8. In the last 48 hours, our services.cfg and hosts.cfg files have stopped updating from changes made in the UI. Is this an issue you all have run into before?

We looked at this article and it was not relevant: https://support.nagios.com/kb/article/n ... ce-39.html

Please let me know what information you need to help us troubleshoot this.


Thanks in advance for your time!
wneville
Posts: 59
Joined: Wed Mar 31, 2021 3:35 pm

Re: Configuration Files Not Updating

Post by wneville »

To be more specific, we can add and remove hosts and services, but we cannot edit options within them.

For example, when editing a mssql query to change the --result flag.
- edited in UI
- Apply Config is successful
- check the service.cfg file and no changes have taken place
- strangely enough, the change is present if you navigate back to the service in the UI

This is happening for hosts as well
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Configuration Files Not Updating

Post by ssax »

Usually when I see this it's because there is a duplicate service that is overriding the one you're changing.

Please PM me a copy of your profile.zip, you can download it from Admin > System Profile by clicking the Download Profile button.

PM me the host/service name that you're modifying as well.

Additionally, please send the output of these commands:
- NOTE: You may need to adjust the -h 127.0.0.1, the -uroot, and -pnagiosxi in the first command if your DB is offloaded to another server and/or you've changed the root mysql password

Code: Select all

echo "SELECT table_name AS 'Table', round(((data_length + index_length) / 1024 / 1024), 2) 'Size in MB' FROM information_schema.TABLES WHERE table_schema IN ('nagios', 'nagiosql', 'nagiosxi');" | mysql -h 127.0.0.1 -uroot -pnagiosxi --table
wneville
Posts: 59
Joined: Wed Mar 31, 2021 3:35 pm

Re: Configuration Files Not Updating

Post by wneville »

Hello,

Profile.zip from the getprofile.sh script PM'd

Command output attached in .txt file

In the PM to you, I have included the host name and service name

We definitely have services with identical Display names, but not config names. Is that an issue?
You do not have the required permissions to view the files attached to this post.
wneville
Posts: 59
Joined: Wed Mar 31, 2021 3:35 pm

Re: Configuration Files Not Updating

Post by wneville »

Hello,

I identified the issue and you were correct - there were 2 services with identical config names but only one entry in the services.cfg file. i changed one of the names, applied config and restarted httpd & nagios services and the services/hosts are acting normal again.

I believe we used a config wizard on this, is that something that will be patched? just curious, not a huge deal to change one of the service names during set-up.

Thanks so much!
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Configuration Files Not Updating

Post by ssax »

It's not actually an issue, you had multiple services with the same service description defined in different locations assigned to the same host which is allowed but only one of them will win out. What I mean by that is nagios will only use one of the services on the host, it matches by the hostname/servicename case-sensitively so if you have two SSH services assigned to the same host you would still only end up with one active SSH service check when nagios is running.

It's a common thing that happens when you initially start assigning services per host (one service per host) and then start using templates or hostgroups to assign them you'll get those duplicate definition messages. You can also see those duplicate definition messages by going to Configure > Core Config Manager > Tools > Config File Management > Verify or via this command from the CLI:

Code: Select all

/usr/local/nagios/bin/nagios -vv /usr/local/nagios/etc/nagios.cfg
They don't really cause problems outside of confusion/settings not taking effect if the other service is the one that is picked up but the path to fix them is a manual process because we don't know which one you actually want. So going through them every now and then is a good idea. You could also setup a check to look for them as well.
wneville
Posts: 59
Joined: Wed Mar 31, 2021 3:35 pm

Re: Configuration Files Not Updating

Post by wneville »

Understood - thanks so much for the help and thoughtful explanation!!
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Configuration Files Not Updating

Post by ssax »

No problem, let us know if you have any related questions or when we're okay to lock this up and mark it as resolved.

Thank you!
wneville
Posts: 59
Joined: Wed Mar 31, 2021 3:35 pm

Re: Configuration Files Not Updating

Post by wneville »

you may lock - thanks again
Locked