Can't delete hosts (tried ghost hosts, but still not working

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
tom_wong
Posts: 37
Joined: Thu Oct 25, 2012 9:13 am

Can't delete hosts (tried ghost hosts, but still not working

Post 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
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Can't delete hosts (tried ghost hosts, but still not wor

Post by tmcdonald »

Former Nagios employee
tom_wong
Posts: 37
Joined: Thu Oct 25, 2012 9:13 am

Re: Can't delete hosts (tried ghost hosts, but still not wor

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Can't delete hosts (tried ghost hosts, but still not wor

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
tom_wong
Posts: 37
Joined: Thu Oct 25, 2012 9:13 am

Re: Can't delete hosts (tried ghost hosts, but still not wor

Post by tom_wong »

That works, thanks!
Locked