Page 1 of 1
Issue With Ghost Host and Service
Posted: Thu Mar 13, 2014 11:27 am
by CMSNagios
Hi Team,
Deleted Host and Services come again,
Deleted manully from /usr/local/nagios/hosts and /servoces and after deleting, click on CCM > Write Configuration file > Write ghost host and services come agian.
I am doing this many time, issue not resole.
Kindly help for the same.
Re: Issue With Ghost Host and Service
Posted: Thu Mar 13, 2014 11:41 am
by lmiltchev
Are you sure these are "ghost" hosts/services? Did you delete them first from the database (in the CCM)? Deleting them manually from the CLI will not do anything if they are still in the database...
Re: Issue With Ghost Host and Service
Posted: Thu Mar 13, 2014 12:02 pm
by CMSNagios
How will I remove form database ?
Re: Issue With Ghost Host and Service
Posted: Thu Mar 13, 2014 12:05 pm
by tmcdonald
Go to the CCM, delete it as normal. Then Apply Config.
Re: Issue With Ghost Host and Service
Posted: Thu Mar 13, 2014 12:48 pm
by CMSNagios
Please share path of deleting database.
Re: Issue With Ghost Host and Service
Posted: Thu Mar 13, 2014 12:50 pm
by slansing
Not quite sure what you are asking here, Lmiltchev told you how to remove your objects from the mysql database, this is done through the CCM.
Re: Issue With Ghost Host and Service
Posted: Thu Mar 13, 2014 1:02 pm
by CMSNagios
I am deleting database from CCM > Tool > Delete Config Backups, but issue is not resolve.
Deleted manually or through CCM, .cfg file again generated automatically
Re: Issue With Ghost Host and Service
Posted: Thu Mar 13, 2014 1:14 pm
by slansing
I am deleting database from CCM > Tool > Delete Config Backups, but issue is not resolve.
There is no page in the CCM that is labeled that. You need to first delete all the services on the host from:
Configure > CCM > Services > (select the services, and delete them)
Then delete the host:
Configure > CCM > Hosts > (select the host and delete it)
Then apply configuration.
After this, are the configurations still in the CCM? Is the apply configuration failing or are you getting three green check marks? If there are not in the CCM, are you still able to see them from Home > Service Detail? If you can, and they are NOT in the CCM, you need to manually delete the service and host configuration files from the command line at:
Code: Select all
/usr/local/nagios/etc/services/<hostname.cfg>
/usr/local/nagios/etc/hosts/<hostname.cfg>
Then they should disappear from the XI front end.
Re: Issue With Ghost Host and Service
Posted: Thu Mar 13, 2014 1:37 pm
by CMSNagios
Configure > CCM > Services > (select the services, and delete them) : Deleted
Then delete the host:
Configure > CCM > Hosts > (select the host and delete it) : Deleted
Then apply configuration.
After this, are the configurations still in the CCM? : No
Is the apply configuration failing or are you getting three green check marks? : 1st Apply failed, 2nd Successfull
If there are not in the CCM, are you still able to see them from Home > Service Detail? : Yes
If you can, and they are NOT in the CCM, you need to manually delete the service and host configuration files from the command line at : Deleted from mention path
Code: Select all/usr/local/nagios/etc/services/<hostname.cfg>
/usr/local/nagios/etc/hosts/<hostname.cfg>
Then they should disappear from the XI front end. : Yes.
After doing above task, Restarting Nagios or Appling Configuration all hosts and services showing in
/usr/local/nagios/etc/services/
/usr/local/nagios/etc/hosts/
Re: Issue With Ghost Host and Service
Posted: Thu Mar 13, 2014 2:13 pm
by abrist
Your post is a bit unclear, did Sam's process work for you?