Page 1 of 1
Can't delete hosts (tried ghost hosts, but still not working
Posted: Fri Dec 06, 2013 7:43 am
by tom_wong
Hi Running Nagiosxi 2012R1.6, after deleting hosts from the CCM and applied configuration, the hosts still exist in the host details page.
Went to /usr/local/nagios/etc/hosts, deleted the files, restart nagios(including rebooting), those hosts still exist in the host details page.
If I tried to apply configuration, again, those host files will be created in the /usr/local/nagios/etc/hosts directory again.
Tried many times, still the same.
Help
Tom
Re: Can't delete hosts (tried ghost hosts, but still not wor
Posted: Fri Dec 06, 2013 9:43 am
by tmcdonald
Re: Can't delete hosts (tried ghost hosts, but still not wor
Posted: Fri Dec 06, 2013 11:20 am
by tom_wong
Hi, I have tried that many times, but everytime, when I 'Apply configuration', those host files just got recreated in the /usr/local/nagios/etc/hosts folder.
Any more suggestion?
Thanks
Tom
Re: Can't delete hosts (tried ghost hosts, but still not wor
Posted: Fri Dec 06, 2013 12:26 pm
by abrist
If the config files are being re-created, you most likely have configuration verification issues. If the configuration verification step fails, XI will roll the configs back to a previous working configuration, essentially writing those configs that you deleted back to the disk. The trick to get around this issue is to make sure that the configuration verifies before applying config:
1. Delete the ghost files from /usr/local/nagios/etc/hosts and /usr/local/nagios/etc/services.
2. In XI, go to --> Configure --> Core Config Manager --> Tools --> Write Config Files.
3. Click "Write" and the "Verify". DO NOT click "Restart" nor apply configuration just yet.
4. You should receive errors from the verification step. Resolve those errors in the CCM.
5. Repeat steps 2 - 4 until the verification is OK.
6. Now restart nagios or apply configuration.
Re: Can't delete hosts (tried ghost hosts, but still not wor
Posted: Mon Dec 16, 2013 9:20 am
by tom_wong
That works, thanks!