Page 1 of 1
Ghost Services, maybe?
Posted: Wed Jun 11, 2014 4:54 am
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?
Re: Ghost Services, maybe?
Posted: Wed Jun 11, 2014 10:53 am
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
Re: Ghost Services, maybe?
Posted: Wed Jun 11, 2014 12:35 pm
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.
Re: Ghost Services, maybe?
Posted: Thu Jun 12, 2014 4:33 am
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.
Re: Ghost Services, maybe?
Posted: Thu Jun 12, 2014 9:11 am
by slansing
Sounds good, let us know how it goes!