NRPE works but Nagios reports "not defined"

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

NRPE works but Nagios reports "not defined"

Postby mijohnst » Wed Dec 05, 2012 6:46 pm

I'm having an issue that I can't seem to figure out. I'm using RHEL5 and attempting to use NRPE to track free space on the root disk. The problem is it's reporting that it is "not defined" even though it is. If I run the command on the remote machine it returns correctly. If I run it from the nagios server it also reports back fine but the service check on the Nagios status page is reporting as not defined.

I can get it to work if I remove the service check from that machine on the Nagios server, wait a few minutes and the re-add it. Then it does a re-check and comes up working but it will eventually starts reporting incorrectly. I'm running the same configuration file on all my Linux machines and they all are working except this one machine. And all the the other monitored services through nrpe are working just fine. It's just this one root disk check for some reason. Am I missing something in my configuration? Does something need to be put in the commands.cfg file on the Nagios server?

Code: Select all
# Remote nrpe.conf
command[check_root]=/usr/local/nagios/libexec/check_disk -w 20% -10% -p /


Code: Select all
# Nagios service  check
define service{
  use                           local-service
  hostgroup                 linux-servers
  service_discriptions  Root Disk /
  check_command        check_nrpe!check_root
}
mijohnst
 
Posts: 10
Joined: Wed Apr 25, 2012 12:03 pm

Re: NRPE works but Nagios reports "not defined"

Postby twelsh » Thu Dec 06, 2012 8:56 am

Hi Mijohnst,

There are several things i would check which are as follows

1. After adding the check to the remote servers nrpe.cfg did you restart the deamon or xinetd? (This will depend on the way you have invoked it to start with)

2. Can you get a version returned from NRPE

check_nrpe -H <hostname>

it should return something like the following

I (0.3.8.75 2010-05-27) seem to be doing fine...

3. If the above are working then nrpe is definitely working and its a config problem with the check.
Add something like teh following to your nrpe.cfg which will just return some simple information and prove that the checks work

command[check_whoami]=whoami
command[check_linux_env]=env

Just some simple checks but hopefully might help you out.

Regards

Tom
twelsh
 
Posts: 15
Joined: Wed Jan 04, 2012 4:40 am


Return to Community Support

Who is online

Users browsing this forum: Bing [Bot] and 10 guests