Defintions of plugin commands not defined in nrpe.cfg?

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
riahc3
Posts: 59
Joined: Thu Apr 05, 2018 9:36 am

Defintions of plugin commands not defined in nrpe.cfg?

Post by riahc3 »

Hello

I was going to use check_uptime but I see it isnt defined in nrpe.cfg First, question: Why?

Second, what is the best or standard way to define all the commands?

Thanks
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Defintions of plugin commands not defined in nrpe.cfg?

Post by npolovenko »

Hello, @riahc3. Depending on the NRPE build, only some or no services will be defined by default. Here is the definition that you can paste into the nrpe.cfg file:

Code: Select all

command[check_uptime]=/usr/local/nagios/libexec/check_uptime $ARG1$
You can define all other commands in a similar way:

Code: Select all

command[command_name_here]=path/to/the/plugin/ $ARG1$
Then restart the nrpe to apply changes and run this command to test out the command:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H 127.0.0.1 -c check_uptime
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked