Deleted Hosts & Services Still Showing in Views

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
bvinisky
Posts: 34
Joined: Wed Jul 06, 2011 11:28 am

Deleted Hosts & Services Still Showing in Views

Post 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
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Deleted Hosts & Services Still Showing in Views

Post by mguthrie »

Try these solutions and see if one of them resolves your issue.
http://support.nagios.com/wiki/index.ph ... lete_Hosts
bvinisky
Posts: 34
Joined: Wed Jul 06, 2011 11:28 am

Re: Deleted Hosts & Services Still Showing in Views

Post 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
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Deleted Hosts & Services Still Showing in Views

Post by mguthrie »

Good deal!
RCIJoe
Posts: 20
Joined: Mon Apr 25, 2011 3:18 pm

Re: Deleted Hosts & Services Still Showing in Views

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Deleted Hosts & Services Still Showing in Views

Post 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/*
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
RCIJoe
Posts: 20
Joined: Mon Apr 25, 2011 3:18 pm

Re: Deleted Hosts & Services Still Showing in Views

Post 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
RCIJoe
Posts: 20
Joined: Mon Apr 25, 2011 3:18 pm

Re: Deleted Hosts & Services Still Showing in Views

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Deleted Hosts & Services Still Showing in Views

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
RCIJoe
Posts: 20
Joined: Mon Apr 25, 2011 3:18 pm

Re: Deleted Hosts & Services Still Showing in Views

Post by RCIJoe »

OK, had some other issues so I rebooted the XI server. Ghost hosts are gone. Thank you, JM
Locked