Configure a plugin as a single command

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
prl77
Posts: 2
Joined: Mon Nov 21, 2016 5:42 pm

Configure a plugin as a single command

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Configure a plugin as a single command

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
prl77
Posts: 2
Joined: Mon Nov 21, 2016 5:42 pm

Re: Configure a plugin as a single command

Post by prl77 »

Thank you for your time Scott.
Locked