Page 1 of 2

Removed Hosts Still Showing in Host Status Detail

Posted: Thu Mar 14, 2013 2:23 pm
by asmgiadmin
Inactive hosts were removed from hosts using CCM, but still show as down in host status detail.

How?

Re: Removed Hosts Still Showing in Host Status Detail

Posted: Thu Mar 14, 2013 2:30 pm
by abrist
First, did you "apply configuration"?
Second, have these hosts had their "config name" changed a few months ago?
Finally, did you upgrade XI at some point from any version older than 2012r1.4?

Re: Removed Hosts Still Showing in Host Status Detail

Posted: Thu Mar 14, 2013 2:52 pm
by asmgiadmin
First, did you "apply configuration"?
Yes - successfully applied.
Second, have these hosts had their "config name" changed a few months ago?
Not to my knowledge. They were added with auto-discovery and have been left unchanged since then.
Finally, did you upgrade XI at some point from any version older than 2012r1.4?
Nagios XI 2012R1.6

Hosts do not exist under hosts in CCM but still show as down in host status.

Re: Removed Hosts Still Showing in Host Status Detail

Posted: Thu Mar 14, 2013 3:11 pm
by slansing
If you access your Nagios XI server from the CLI are you able to see the hosts in:

Code: Select all

/usr/local/nagios/etc/hosts
Have you made sure you are not filtering your search results in the CCM and thus not able to see the hosts? Not calling you crazy just going through the motions.

Re: Removed Hosts Still Showing in Host Status Detail

Posted: Thu Mar 14, 2013 3:17 pm
by asmgiadmin
ahh - cfg file exists with the following:

Code: Select all

###############################################################################
#
# Host configuration file
#
# Created by: Nagios QL Version 3.0.3
# Date:       2013-03-14 14:31:19
# Version:    Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios QL will overwite all manual settings during the next update
#
###############################################################################

define host {
        host_name                       host.domain
        use                             xiwizard_generic_host
        address                         host.domain
        hostgroups                      servers-windows-all
        max_check_attempts              5
        check_interval                  5
        retry_interval                  1
        check_period                    xi_timeperiod_24x7
        contacts                        nagiosadmin
        notification_interval           60
        notification_period             xi_timeperiod_24x7
        _xiwizard                       autodiscovery
        register                        1
        }

###############################################################################
#
# Host configuration file
#
# END OF FILE
#
###############################################################################
Why does hostfile.cfg exist, but not appear in CCM -> hosts?

Re: Removed Hosts Still Showing in Host Status Detail

Posted: Thu Mar 14, 2013 3:28 pm
by sreinhardt
Lets try moving that file out of the configuration directory and apply configuration. This should effectively test if it is still in your database and getting recreated.

cp /usr/local/nagios/etc/hosts/host.domain.cfg /tmp
go into XI and apply configuration. If this fails please send us the error log, if not look at the .../etc/hosts directory again for that same file. If it does not exist in there anymore, does it still exist in the XI interface or CCM?

Re: Removed Hosts Still Showing in Host Status Detail

Posted: Fri Mar 15, 2013 7:40 am
by asmgiadmin
copied hostname.cfg to /tmp
rm hostname.cfg
apply configuration - success
hostname.cfg re-created.

Re: Removed Hosts Still Showing in Host Status Detail

Posted: Fri Mar 15, 2013 9:47 am
by slansing
So that verifies that the host is indeed still residing in the database.

Take a look at this piece within our Wiki page, follow the directions specified for Ghost Hosts and let us know what the result is, thanks!:

http://support.nagios.com/wiki/index.ph ... t_Hosts.29

Re: Removed Hosts Still Showing in Host Status Detail

Posted: Fri Mar 15, 2013 10:17 am
by asmgiadmin
that seems to have worked.

So now, I have issue where there are multiple .cfg files in /usr/local/nagios/etc/hosts that do no exist in UI. How can I remove any host.cfg that does not currently exist in UI?

I'm getting alerts since .cfg file still exists with hostgoup and need to remove all that do not exist in UI.

Re: Removed Hosts Still Showing in Host Status Detail

Posted: Fri Mar 15, 2013 10:31 am
by abrist
Follow the link in Sam's post to remove the other ghost configs. Do not apply configuration until all errors in the verify process are resolved.