I am having an issue deleting a host, I saw the same issue int "Host still showing up under service status" post but that fix did not work for me.
I deleted the host an it no longer appears in the core config manager, however the host config file is still in the /usr/local/nagios/etc/hosts/ directory,
If I manually delete the config file and restart nagios I get a config error message.
If I go through b]core config manager[/b] and issue the Apply Configuration this command fails thee first time and succeeds the second time.
Then the host config file reappears int /usr/local/nagios/etc/hosts/ directory.
Any ideas?
Sal
unable to delete host
Re: unable to delete host
Yeah, you can't normally delete a config file manually because NagiosQL (the CCM) will just rewrite the file from the database. You'll probably need to use the write config tool in the CCM to export your config from the database. However, FIRST what you should do is check the text output from the Configuration Snapshot from when your Apply Configuration failed. Identify the source of the error and verify what's causing the Apply to fail, and fix as needed. Ideally you always want to get the Apply Configuration to work through CCM.
If you can't get that to work, try and the Write Config Tool in the CCM and verify the config before restarting Nagios. If for some reason the restart fails from the Write Config Tool (there's a known bug on this) you can restart Nagios from the Admin page.
Also, it would be good to check to make sure you don't have multiple instances of Nagios running. This can cause unpredictable results.
Type from the command line:
killall -9 nagios
And then start Nagios again from the Admin menu if you think this could be an issue.
If you can't get that to work, try and the Write Config Tool in the CCM and verify the config before restarting Nagios. If for some reason the restart fails from the Write Config Tool (there's a known bug on this) you can restart Nagios from the Admin page.
Also, it would be good to check to make sure you don't have multiple instances of Nagios running. This can cause unpredictable results.
Type from the command line:
killall -9 nagios
And then start Nagios again from the Admin menu if you think this could be an issue.
Re: unable to delete host
That worked.
Thanks for the help.
Thanks for the help.