NRPE: Command '*' not defined

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jkinning
Posts: 747
Joined: Wed Oct 09, 2013 2:54 pm

NRPE: Command '*' not defined

Post 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?
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: NRPE: Command '*' not defined

Post by jdalrymple »

NRPE has a sort of "conf.d" type option.

Look for "include_dir=" in your nrpe.cfg
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NRPE: Command '*' not defined

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked