Page 1 of 2
Delete command created from 'reconfigure service'
Posted: Mon May 07, 2012 3:19 pm
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...

Re: Delete command created from 'reconfigure service'
Posted: Mon May 07, 2012 3:34 pm
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?
Re: Delete command created from 'reconfigure service'
Posted: Mon May 07, 2012 3:35 pm
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
Re: Delete command created from 'reconfigure service'
Posted: Mon May 07, 2012 3:37 pm
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.
Re: Delete command created from 'reconfigure service'
Posted: Tue May 08, 2012 7:28 am
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.
Re: Delete command created from 'reconfigure service'
Posted: Tue May 08, 2012 11:52 am
by scottwilkerson
Does that host have a template applied to it that could contain the command?
Re: Delete command created from 'reconfigure service'
Posted: Tue May 08, 2012 1:09 pm
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.
Re: Delete command created from 'reconfigure service'
Posted: Tue May 08, 2012 2:01 pm
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?
Re: Delete command created from 'reconfigure service'
Posted: Wed May 09, 2012 8:36 am
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).
Re: Delete command created from 'reconfigure service'
Posted: Wed May 09, 2012 9:40 am
by scottwilkerson
The part where you blocked out the service name, is where it needs to be removed.