Page 2 of 2
Re: Removed Hosts Still Showing in Host Status Detail
Posted: Fri Mar 15, 2013 10:34 am
by asmgiadmin
The link worked well and resolved issue.
The problem is that I have hosts in /etc/hosts that do not exist when browsing CCM -> Hosts.
I'm wondering if there is a way to remove any .cfg files in /etc/hosts that do not exist in DB where UI pulls information.
Re: Removed Hosts Still Showing in Host Status Detail
Posted: Fri Mar 15, 2013 10:44 am
by abrist
Yes. You just remove them from the cli.
Code: Select all
rm /usr/local/nagios/etc/hosts<name of host>
Re: Removed Hosts Still Showing in Host Status Detail
Posted: Fri Mar 15, 2013 10:50 am
by asmgiadmin
That works great, but how can .cfg files that exist in /etc/hosts but not DB be identified?
The issue is that .cfg files exist in /etc/hosts that do not exist in UI. I'd like to remove any .cfg file that does not exist in UI but cannot feasibly compare several hundred hosts.
Re: Removed Hosts Still Showing in Host Status Detail
Posted: Fri Mar 15, 2013 11:04 am
by slansing
asmgiadmin,
When Ghost Hosts are left behind you MUST remove them by hand, there is no other simple way.. It sounds like you have already identified hosts who are not located in the CCM but show up in your views, these must be removed, by hand, from the command line as they are being drawn back into the list since they were created, added to the database, then their definition was removed somewhere along the line. This is the only way to remove these files safely due to the nature of how they are being read at this point, NagiosQL can not actively touch them.
Re: Removed Hosts Still Showing in Host Status Detail
Posted: Fri Mar 15, 2013 11:13 am
by asmgiadmin
Are you able to communicate where hostnames are stored in DB? I'd like to query DB for hostnames to compare to directory listing in /usr/local/nagios/etc/hosts.
Re: Removed Hosts Still Showing in Host Status Detail
Posted: Fri Mar 15, 2013 12:07 pm
by asmgiadmin
nevermind, sorting through host detail and exporting to excel.
This thread my closed.
Re: Removed Hosts Still Showing in Host Status Detail
Posted: Fri Mar 15, 2013 1:35 pm
by slansing
Closing as resolved.