Page 1 of 3

Can't Delete Service in CCM

Posted: Wed Jul 29, 2015 9:45 am
by J.T.
Hey all,

I am using Nagios XI to monitor all of our Dell and HP physical servers, and using the check_openmanage and check_hp plugins to do so.

When I apply check_openmanage to a Dell server everything runs smoothly. However, I have run into a problem where when I try to apply the check_hp plugin to a server via SNMP, it automatically adds the check_openmanage service as well. When I try to delete this service while in view mode I get "Could not find a unique id for this service
Service cannot be deleted using this method", and it directs me to the Core Config Manager. However when I get to the CCM the check_openmanage service isn't there, but it is clearly visible in the view window.

In an attempt to fix this issue I read that it might be a "ghost service" that when entering the commands "killall nagios" and "service nagios start" in the console it will fix it. However it didn't and the unwanted service is still visible in the view mode.

So next I tried to manually delete it from the /usr/local/nagios/etc/services directory, however it is not there either! The only way I can get it to go away is if I manually delete the host it is tied to in the /usr/local/nagios/etc/hosts directory.

Does anyone know why this might be happening to me?

Thanks in advance.

[Edit] Do comments have to be approved by moderators as well?

Re: Can't Delete Service in CCM

Posted: Wed Jul 29, 2015 10:01 am
by tmcdonald
What XI version are you using? Go to Configure -> Core Config Manager, then on the left under Tools click Write Config Files. Then if you have all these options, click Delete, then Write, then Verify and post a screenshot. If you do not have these options please let me know.

Re: Can't Delete Service in CCM

Posted: Wed Jul 29, 2015 10:04 am
by J.T.
I am using version 2.7. On that page it says "Delete all Host / Service Configuration File" right above the delete button. I really don't want to delete everything as setting everything up took quite a while. Will this delete everything?

Re: Can't Delete Service in CCM

Posted: Wed Jul 29, 2015 10:29 am
by tmcdonald
That just deletes the configuration files. Clicking the "Write" button will write them all out again. Everything in the CCM is stored in a database, and "Apply Config" writes what is in the database out to configuration files that Nagios can use. The reason we added the "Delete" button is to get rid of rogue config files that, for one reason or another, were not properly deleted when the associated hosts/services were removed in the CCM.

Re: Can't Delete Service in CCM

Posted: Wed Jul 29, 2015 10:35 am
by J.T.
Okay I did what you said and I uploaded a screenshot of the error that I am now getting after i clicked on verify.

Re: Can't Delete Service in CCM

Posted: Wed Jul 29, 2015 10:44 am
by tmcdonald
That means that one of your services is (most likely) missing a description. It is also technically possible that it is not attached to a host, but much much less likely.

You're looking for one of your services related to dell-bladechassis, and if you search the CCM for one of those you should find out without a description, which is required to apply properly.

Re: Can't Delete Service in CCM

Posted: Wed Jul 29, 2015 10:51 am
by J.T.
The "dell-bladechassis" service I actually wasn't even using, so I deleted it and when I hit verify, the error was gone.

However this still hasn't fixed the problem that I am still having. I will attach to screenshots to show that the "Dell Check" service is visible in the services view, but not visible in the CCM.

As you can see in the first picture the "ihe-testnagios" server has the Dell Check service, but it is not there in the second picture (CCM) which is arranged by server name alphabetically.

Re: Can't Delete Service in CCM

Posted: Wed Jul 29, 2015 11:19 am
by lmiltchev
Do you still see the "Dell Check" service, if you go to Configure -> Core Config Manager-> Write Config Files, click Delete, then Write, then Verify, and apply configuration?

Re: Can't Delete Service in CCM

Posted: Wed Jul 29, 2015 11:23 am
by J.T.
I just did all of those steps again, and yes I still see it.

Any other ideas?

Re: Can't Delete Service in CCM

Posted: Wed Jul 29, 2015 12:07 pm
by lmiltchev
Try stopping/starting services:

Code: Select all

service nagios stop
killall -9 nagios
service ndo2db stop
service ndo2db start
service nagios start
If this doesn't help, run the following commands and show the output:

Code: Select all

ll /usr/local/nagios/etc/hosts | grep testnagios
ll /usr/local/nagios/etc/services | grep testnagios
grep -R "Dell Check" /usr/local/nagios/etc/services/
echo 'select * from tbl_service;\G' | mysql -pnagiosxi nagiosql | grep "Dell Check" | awk {'print $2 "-> " $7'}