Page 1 of 1

Deleted Hosts & Services Still Showing in Views

Posted: Tue Nov 29, 2011 5:47 pm
by bvinisky
Hi,

I have several hosts that have been deleted and no longer show up in the configuration area, yet they're still present in the Views section along with their services. How do I get rid of them? I see there's a nagiosql_delete_host.php script, but i'm hesitant to use it without knowing what exactly it does.

Thanks,

Bryant

Re: Deleted Hosts & Services Still Showing in Views

Posted: Wed Nov 30, 2011 12:00 pm
by mguthrie
Try these solutions and see if one of them resolves your issue.
http://support.nagios.com/wiki/index.ph ... lete_Hosts

Re: Deleted Hosts & Services Still Showing in Views

Posted: Wed Nov 30, 2011 8:03 pm
by bvinisky
Thank you kindly. Deleting the leftover cfg files from /usr/local/nagios/etc/hosts/ & /usr/local/nagios/etc/services/ did the trick.

Bryant

Re: Deleted Hosts & Services Still Showing in Views

Posted: Thu Dec 01, 2011 10:27 am
by mguthrie
Good deal!

Re: Deleted Hosts & Services Still Showing in Views

Posted: Thu Mar 08, 2012 4:20 pm
by RCIJoe
I have this issue. The host configuration files were not in either host or services directories. I tried all recommended solutions but the hosts continue to populate my service and host group views in XI.

Re: Deleted Hosts & Services Still Showing in Views

Posted: Thu Mar 08, 2012 5:54 pm
by scottwilkerson
RCIJoe,

We are going to have to look to see where these files are, can I have you run the following changing THE_HOST to the name of your host

Code: Select all

grep -lir "THE_HOST" /usr/local/nagios/etc/*

Re: Deleted Hosts & Services Still Showing in Views

Posted: Fri Mar 09, 2012 5:13 pm
by RCIJoe
scottwilkerson wrote:RCIJoe,

We are going to have to look to see where these files are, can I have you run the following changing THE_HOST to the name of your host

Code: Select all

grep -lir "THE_HOST" /usr/local/nagios/etc/*
The only files returned were

/usr/local/nagios/etc/pnp/config.php
/usr/local/nagios/etc/pnp/npcd.cfg
/usr/local/nagios/etc/cgi.cfg
/usr/local/nagios/etc/commands.cfg

Thanks

Re: Deleted Hosts & Services Still Showing in Views

Posted: Fri Mar 09, 2012 5:46 pm
by RCIJoe
scottwilkerson wrote:RCIJoe,

We are going to have to look to see where these files are, can I have you run the following changing THE_HOST to the name of your host

Code: Select all

grep -lir "THE_HOST" /usr/local/nagios/etc/*
I think I misinterpreted "THE_HOST" and typed the nagios host name the first time. When I use the host name for the one I deleted I get no returns.

Re: Deleted Hosts & Services Still Showing in Views

Posted: Sun Mar 11, 2012 1:54 pm
by scottwilkerson
Lets run

Code: Select all

service nagios stop
killall -9 nagios
service nagios start
Then look to see if the host still shows up in the web GUI

Re: Deleted Hosts & Services Still Showing in Views

Posted: Wed Mar 14, 2012 11:58 am
by RCIJoe
OK, had some other issues so I rebooted the XI server. Ghost hosts are gone. Thank you, JM