Page 1 of 1
GUI not writing to config files?
Posted: Wed Jan 15, 2025 4:00 pm
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?
Re: GUI not writing to config files?
Posted: Wed Jan 15, 2025 5:25 pm
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.
Re: GUI not writing to config files?
Posted: Thu Jan 16, 2025 6:37 pm
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.
Re: GUI not writing to config files?
Posted: Fri Jan 17, 2025 1:18 am
by kg2857
Try running the reconfigure script from the shell and looking at the output.
Re: GUI not writing to config files?
Posted: Wed Jan 29, 2025 2:42 pm
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.
Re: GUI not writing to config files?
Posted: Thu Jan 30, 2025 12:38 pm
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.
Re: GUI not writing to config files?
Posted: Mon Mar 31, 2025 10:30 am
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.
Re: GUI not writing to config files?
Posted: Mon Mar 31, 2025 2:13 pm
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!