Issue With Ghost Host and Service

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
CMSNagios
Posts: 13
Joined: Wed Feb 05, 2014 7:19 am

Issue With Ghost Host and Service

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Issue With Ghost Host and Service

Post 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...
Be sure to check out our Knowledgebase for helpful articles and solutions!
CMSNagios
Posts: 13
Joined: Wed Feb 05, 2014 7:19 am

Re: Issue With Ghost Host and Service

Post by CMSNagios »

How will I remove form database ?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Issue With Ghost Host and Service

Post by tmcdonald »

Go to the CCM, delete it as normal. Then Apply Config.
Former Nagios employee
CMSNagios
Posts: 13
Joined: Wed Feb 05, 2014 7:19 am

Re: Issue With Ghost Host and Service

Post by CMSNagios »

Please share path of deleting database.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Issue With Ghost Host and Service

Post 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.
CMSNagios
Posts: 13
Joined: Wed Feb 05, 2014 7:19 am

Re: Issue With Ghost Host and Service

Post 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
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Issue With Ghost Host and Service

Post 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.
CMSNagios
Posts: 13
Joined: Wed Feb 05, 2014 7:19 am

Re: Issue With Ghost Host and Service

Post 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/
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Issue With Ghost Host and Service

Post by abrist »

Your post is a bit unclear, did Sam's process work for you?
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.
Locked