Can't Delete Service in CCM

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
J.T.
Posts: 11
Joined: Wed Jun 10, 2015 8:35 am

Can't Delete Service in CCM

Post 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?
Last edited by J.T. on Wed Jul 29, 2015 10:20 am, edited 1 time in total.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Can't Delete Service in CCM

Post 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.
Former Nagios employee
J.T.
Posts: 11
Joined: Wed Jun 10, 2015 8:35 am

Re: Can't Delete Service in CCM

Post 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?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Can't Delete Service in CCM

Post 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.
Former Nagios employee
J.T.
Posts: 11
Joined: Wed Jun 10, 2015 8:35 am

Re: Can't Delete Service in CCM

Post 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.
You do not have the required permissions to view the files attached to this post.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Can't Delete Service in CCM

Post 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.
Former Nagios employee
J.T.
Posts: 11
Joined: Wed Jun 10, 2015 8:35 am

Re: Can't Delete Service in CCM

Post 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.
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Can't Delete Service in CCM

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
J.T.
Posts: 11
Joined: Wed Jun 10, 2015 8:35 am

Re: Can't Delete Service in CCM

Post by J.T. »

I just did all of those steps again, and yes I still see it.

Any other ideas?
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Can't Delete Service in CCM

Post 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'}
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked