Ghost Services, maybe?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Stuart Watts
Posts: 40
Joined: Wed Sep 25, 2013 7:01 am

Ghost Services, maybe?

Post by Stuart Watts »

Hi all,

We have a customer who's reporting strange behaviour on their two 2014R1.1 XI installations since upgrading.

Deleting services in CCM appears to work correctly, with no errors reported. However, these services remain displayed under the host. Attempting to delete them from the service detail view ("Confgure" tab) yields the error:

Code: Select all

    Could not find a unique id for this service
    Service cannot be deleted using this method
So this appears to be the documented ghost services bug (services are removed from the DB, but don't get removed from the config files). However, the services still appear in the DB. So I'm not sure what's causing this. I also can't see any errors in any logs. Would someone be able to give me any suggestions on how to fix this?
technick
Posts: 49
Joined: Tue Feb 04, 2014 10:30 am
Location: Denver, CO

Re: Ghost Services, maybe?

Post by technick »

I like to call these the "Ghost In The Machine" problems... I've noticed this a few times myself and I believe CCM sometimes will loss track of the services and hosts files. What you can do is delete the full /usr/local/etc/nagios/services directory and go back into CCM and Apply Configuration. This will write everything that is being tracked in the database back out to flat file and restart Nagios. You can also fully delete /usr/local/nagios/etc/hosts if you see ghost hosts and apply configuration again. There's not much you can't delete that CCM won't rebuild for you... Just don't delete your static directory and always... ALWAYS make sure you have a backup =).

Cheers
Last edited by technick on Wed Jun 11, 2014 3:40 pm, edited 1 time in total.
----------------------
Nagios Jedi in training.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Ghost Services, maybe?

Post by abrist »

technick wrote:ALWAYS make sure you have a backup =).
AHAHAHA! Actually this is a bug with the new apply config process. The fix will be in 2014r1.2. For now, you can replace the file:

Code: Select all

/usr/local/nagiosxi/html/includes/components/ccm/includes/delete_object.inc.php  
With the one attached to this post below.

There is still a bug with the "delete host|service" link on the home --> object --> details --> configure tab that we are working on fixing atm. But the ccm delete options should work after this file is replaced. More info on the details delete option soon.
You do not have the required permissions to view the files attached to this post.
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.
Stuart Watts
Posts: 40
Joined: Wed Sep 25, 2013 7:01 am

Re: Ghost Services, maybe?

Post by Stuart Watts »

Thanks for the responses, guys.

I'm not sure re-writing all of the config files would work in this situation, as the CCM wasn't deleting the objects from the DB, so my guess is they'd just be recreated again.

Unfortunately, the customer had to roll back to 2014R1.0 as they're going live with their new XI installation next week. Will keep an eye on this.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Ghost Services, maybe?

Post by slansing »

Sounds good, let us know how it goes!
Locked