Page 1 of 1

Configure a plugin as a single command

Posted: Mon Mar 27, 2017 12:43 pm
by prl77
I got a plugin that is working when running from command line. I would now like to implement it, add it to Nagios. But instead of trying to figure out $ARG$ and "!" and adding hosts and services, can I just somehow add this single command without the additional complexity of the other stuff? This will only run with a single set to arguments so I don't need to make it generic so I can customize later for different purposes.

Re: Configure a plugin as a single command

Posted: Mon Mar 27, 2017 12:52 pm
by scottwilkerson
yes you can simply add the command like this

Code: Select all

define command {
       command_name                             your_new_check
       command_line                             /your/command/here -a your_arg
}
then add that as the check_command to hosts/services or templates with

Code: Select all

check_command                            your_new_check

Re: Configure a plugin as a single command

Posted: Mon Mar 27, 2017 1:12 pm
by prl77
Thank you for your time Scott.