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.
Removed Hosts Still Showing in Host Status Detail
-
asmgiadmin
- Posts: 125
- Joined: Tue Feb 12, 2013 5:00 pm
Re: Removed Hosts Still Showing in Host Status Detail
Yes. You just remove them from the cli.
Code: Select all
rm /usr/local/nagios/etc/hosts<name of host>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.
"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.
-
asmgiadmin
- Posts: 125
- Joined: Tue Feb 12, 2013 5:00 pm
Re: Removed Hosts Still Showing in Host Status Detail
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.
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.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Removed Hosts Still Showing in Host Status Detail
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.
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.
-
asmgiadmin
- Posts: 125
- Joined: Tue Feb 12, 2013 5:00 pm
Re: Removed Hosts Still Showing in Host Status Detail
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.
-
asmgiadmin
- Posts: 125
- Joined: Tue Feb 12, 2013 5:00 pm
Re: Removed Hosts Still Showing in Host Status Detail
nevermind, sorting through host detail and exporting to excel.
This thread my closed.
This thread my closed.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Removed Hosts Still Showing in Host Status Detail
Closing as resolved.