Page 1 of 2
Ghost config
Posted: Tue Mar 18, 2025 12:22 pm
by matson-itops
Getting error below :
Error: Could not find any host matching 'EQX1VWPD05 - WMS Database Server' (config file '/usr/local/nagios/etc/services/EQX1VWPD05 - WMS Database Server.cfg', starting on line 127)
this file and host does not exist anymore. How can I clear it? it is preventing me from applying configuration.
Re: Ghost config
Posted: Tue Mar 18, 2025 1:00 pm
by DoubleDoubleA
Delete the service first in the CCM, then the host.
In order to delete a host, we have to remove all of the dependencies on it.
Re: Ghost config
Posted: Tue Mar 18, 2025 1:22 pm
by matson-itops
Hi
Not sure in what order I did the deletes.
I was able to delete services and host. I no longer see the services, hosts, or raw config file
referenced in the error.
But still no luck applying configuration.
Re: Ghost config
Posted: Tue Mar 18, 2025 1:47 pm
by jmichaelson
Can you go back to the last known good configuration snapshot and re-attempt your deletes?
Re: Ghost config
Posted: Tue Mar 18, 2025 1:55 pm
by matson-itops
Went back to oldest config we have and still same error.
Re: Ghost config
Posted: Tue Mar 18, 2025 3:44 pm
by DoubleDoubleA
Re: Ghost config
Posted: Tue Mar 18, 2025 4:44 pm
by matson-itops
No errors, but still unable to "apply config"
I also confirmed config files were re-written.
Is there anywhere else this "bad config" could still be hiding?
Re: Ghost config
Posted: Wed Mar 19, 2025 1:42 pm
by tgriep
Take a look in this directory for a configuration file
/usr/local/nagios/etc/import/
If you see a file in there, that could be what is creating the configuration error so delete the file.
Re-run the Delete, Write, Delete, Verify process from the KB article again and if the verify works, try and apply the configuration.
Re: Ghost config
Posted: Wed Mar 19, 2025 5:56 pm
using different account . matson-itops /
[email protected].
I do find the host under /usr/local/nagios/etc/hosts
I keeps showing back up after a delete/write. I suspect this config is somehow in DB or cached somewhere.
Re: Ghost config
Posted: Fri Mar 21, 2025 3:22 pm
by gwesterman
Hi,
You can try repairing the database if you haven't already.
Code: Select all
cd /usr/local/nagiosxi/scripts
./repair_databases.sh
service nagios stop
service ndo2db restart
service nagios start