GUI not writing to config files?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
lveitch
Posts: 38
Joined: Fri Mar 22, 2024 10:02 am

GUI not writing to config files?

Post by lveitch »

So this is very odd for me and I could use some suggestions on troubleshooting gents!

So I go into CCM, and add a service check to a particular host, says complete like usual = AWESOME!
The new check shows up in CCM under the host as expected and I can look at the config file to the right and verify the new service is listed there and all is good = AWESOME!

Here is the odd part - when I go to the Dashboard and look at the host and the services under it...it does not appear. So I thought...reboot? Didnt fix it...

So then I went and looked at the config file for that host (/usr/local/nagios/etc/services) and I see that the service that I just created in the GUI isn't writing to the config file. So I got back into CCM, verify files (looks perfect), and write to files manually...then go back to SSH and check the file but it still not writing to the config.

Now I was able to 'fix' that by just adding the check to the file directly and restarting Nagios and then it showed in the GUI and passes checks and looks fine.

I am just curious why its not writing the file and things I can look at to try and fix the issue :?:

Any ideas?
User avatar
jmichaelson
Posts: 375
Joined: Wed Aug 23, 2023 1:02 pm

Re: GUI not writing to config files?

Post by jmichaelson »

The first question I have is whether the configuration applied. In CCM go into Quick Tools->Apply Configuration and apply any outstanding changes if there are any. Second, go into Quick Tools-Configuration Snapshots and see if the current configuration shows that it's ok.
Please let us know if you have any other questions or concerns.

-Jason
lveitch
Posts: 38
Joined: Fri Mar 22, 2024 10:02 am

Re: GUI not writing to config files?

Post by lveitch »

Appreciate the questions; always good to check these as well...unfortunately everything was good :-(
jmichaelson wrote: Wed Jan 15, 2025 5:25 pm In CCM go into Quick Tools->Apply Configuration and apply any outstanding changes if there are any
Says Configuration applied successfully
Nagios Core was restarted with an updated configuration
jmichaelson wrote: Wed Jan 15, 2025 5:25 pm Quick Tools-Configuration Snapshots and see if the current configuration shows that it's ok.
All snapshots show green from the previous day.
kg2857
Posts: 490
Joined: Wed Apr 12, 2023 5:48 pm

Re: GUI not writing to config files?

Post by kg2857 »

Try running the reconfigure script from the shell and looking at the output.
gregbeyer
Posts: 181
Joined: Fri Sep 11, 2020 2:13 pm

Re: GUI not writing to config files?

Post by gregbeyer »

I've experienced on multiple occasions that database suffers corruptions -- a mess to cleanup. Provided scripts don't handle it. May be your trouble.
User avatar
lgute
Posts: 410
Joined: Mon Apr 06, 2020 2:49 pm

Re: GUI not writing to config files?

Post by lgute »

Hi @lveitch,

If @gregbeyer is correct about database corruption, there are 2 scripts you could try running.

Code: Select all

/usr/local/nagiosxi/scripts/repair_databases.sh
...and if you are still having issues you can run this script.

Code: Select all

/usr/local/nagiosxi/scripts/repair_crashed_databases.sh
Both of these scripts are fairly safe, but I would still recommend creating a backup before running them.
Please let us know if you have any other questions or concerns.

-Laura
davekay
Posts: 1
Joined: Thu Feb 18, 2016 5:07 pm

Re: GUI not writing to config files?

Post by davekay »

This sounds exactly like the issue we are currently experiencing.

We had been running on Cent7 for a long time and finally had time to get things migrated to a newer OS. I had to run several intermediate upgrades to get to the latest version but so far the system has been performing fine, except for this issue with CCM.

I can create new services/hosts just fine either from a wizard or manually and the .cfg files get updated/created no problem. But if I then go in and tweak a service shortly after it was created those changes are not written to the cfg file. The apply configuration page shows that everything was successful, but CCM status column for the tweaked service shows "Not Applied" and no message displays at the top of the page indicating there are detected changes.

No matter how many times I apply the configuration, those tweaks are not written. If I edit another service on a different host, those changes are written and sometimes the tweaks that weren't previously written are included.

I have a ticket open with support, but so far, they haven't been able to pinpoint the cause or fix it. I have not been able to find a pattern to when the cfg will or won't be written.
lveitch
Posts: 38
Joined: Fri Mar 22, 2024 10:02 am

Re: GUI not writing to config files?

Post by lveitch »

Dave,

Yeah its still an issue. I just found it easier to delete the config file and re-create it like its new so everything works and is good but I know thats not feasible in all scenarios.

We have the same issue. It shows it updated and everything looks good, even the file has the updated date on it in the OS...but when you open it, the new config changes are not there.

Hopefully they give you an answer and easy fix for it...its annoying to say the least!
Post Reply