Page 1 of 1

NRPE: Command '*' not defined

Posted: Thu Mar 26, 2015 2:52 pm
by jkinning
I am trying to figure out where or how to define a check. I am running Nagios XI 2014R2.6 and have several SUSE clients. I finally started to get the NRPE agent installed and have some of the basic checks working, disk, swap, load, user, etc but I am now trying to add some others like check_uptime, check_ntp_time and check a custom .pl script that I have. On the nagios server I try to use /usr/local/nagios/libexec/check_nrpe -H <hostname> -c check_uptime but get NRPE: Command 'check_uptime" not defined. Same with the other checks. All the checks in the nrpe.cfg are commented out so how are the ones working and not these?

Re: NRPE: Command '*' not defined

Posted: Thu Mar 26, 2015 3:01 pm
by jdalrymple
NRPE has a sort of "conf.d" type option.

Look for "include_dir=" in your nrpe.cfg

Re: NRPE: Command '*' not defined

Posted: Thu Mar 26, 2015 3:04 pm
by lmiltchev
If you used our Linux agent installer, in addition the the "nrpe.cfg", you would have commands defined in the "common.cfg" file as well. Open it in a text editor:

Code: Select all

vi /usr/local/nagios/etc/nrpe/common.cfg
and add a new command (see how the existing commands are defined). Make sure your plugin is in the plugins directory and you have the correct path defined in your command.

Save, exit and restart xinetd (if nrpe is running under xinetd):

Code: Select all

service xinetd restart
Test the "new" command from the command line on the Nagios XI server. If it works, add the check to XI. Here's a document that you can follow:

http://assets.nagios.com/downloads/nagi ... ios-XI.pdf