Delete command created from 'reconfigure service'

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Delete command created from 'reconfigure service'

Post by jbennett »

In an attempt to run a SNMP check through Nagios, I went to the service on a particular host, clicked on the configure tab, then manually entered the check line rather than the check name.

I have managed to get the check to work properly, but now I've realized that what I did above actually created a command with the title as the command and the command as blank. I would like to delete this command in order to clean everything up, but it appears that it is still attached to the given host, though it is showing up as inactive.

How can I go about deleting this command since it doesn't seem to be associated with the host except in the database... :?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Delete command created from 'reconfigure service'

Post by lmiltchev »

When you go to: Core Config Manager->Commands->Commands-><your-command> and click on the "Information" button, does it say that deletion is possible?
Be sure to check out our Knowledgebase for helpful articles and solutions!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Delete command created from 'reconfigure service'

Post by scottwilkerson »

change it in the host first through the CCM, then remove the command through the CCM.

One thing to not, XI will overwrite the txt config files at every save, so if you manually edited it in there, you will need to add it in the CCM or it will be deleted
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: Delete command created from 'reconfigure service'

Post by agriffin »

You should define a new command properly in the Core Config Manager and switch your service over to using that. Then Nagios XI shouldn't complain when you try to delete the old one.
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Re: Delete command created from 'reconfigure service'

Post by jbennett »

lmiltchev wrote:When you go to: Core Config Manager->Commands->Commands-><your-command> and click on the "Information" button, does it say that deletion is possible?
Deletion is not possible because it shows to still be attached to that host. However, when I go to that host, it is not showing up. I did not edit it manually in the text file. I only went there to check and see if it was showing up as being used there as a verification.

I have already created the new command and assigned it in the CCM.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Delete command created from 'reconfigure service'

Post by scottwilkerson »

Does that host have a template applied to it that could contain the command?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Re: Delete command created from 'reconfigure service'

Post by jbennett »

scottwilkerson wrote:Does that host have a template applied to it that could contain the command?
Just double checked. No template assigned to the service, unfortunately.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Delete command created from 'reconfigure service'

Post by lmiltchev »

Deletion is not possible because it shows to still be attached to that host. However, when I go to that host, it is not showing up.
Is the check command attached to a host or a particular service? How did you search for it? Can you post a screenshot of "deletion not possible" message?
Be sure to check out our Knowledgebase for helpful articles and solutions!
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Re: Delete command created from 'reconfigure service'

Post by jbennett »

lmiltchev wrote:Is the check command attached to a host or a particular service? How did you search for it? Can you post a screenshot of "deletion not possible" message?
Does this help?

This is the only place where the command is actually showing up. I have changed the check_snmp_ups around a few times while trying to get it to work (still can't quite get it to work in Nagios, but works fine when I run it manually on the box).
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Delete command created from 'reconfigure service'

Post by scottwilkerson »

The part where you blocked out the service name, is where it needs to be removed.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked