check_nrpe 'No output returned from plugin'

Hi,

I’m running check_nrpe v2 from Nagios, and am trying to monitor one of my Windows XP clients. I have installed NRPE_NT v0.8 on the XP machine and have added the following entry to nrpe.cfg

command[check_nrpe_test]=c:\program files\NRPE_NT\bin\test.cmd

This .cmd file simply Echoes something to the stdout, and then exits with a code of 1.

The relevant entries in my checkcommands.cfg look like this:

command_name check_nrpe_test
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -c check_nrpe_test

and the line in services.cfg looks like this:

check_command check_nrpe_test

When I scheduled this service check, Nagios shows a Status of ‘Warning’ and says that ‘No output returned form plugin’. The NRPE_NT.Log, shows that the command was called, and that it exited with a return code of 1.

If I manually run the command from …/libexec, it executes, but doesn’t display any result. Can anyone shed any light on why i’m not getting the return value back to Nagios.

Thx

Mick

Ahh ha. It’s amazing how obvious something is when you read it again. I am receiving the ‘No output’ message because my test.cmd does not return any output. Nagios is reporting the status of the cmd correctly.

My next question is, how do I get my test.cmd to actually return some data to Nagios for display?

Thx

M

for a plugin to return something to a nagios server it needs two things:

  1. one line of ascii text describing the state (via stdout)
  2. exit value matching one of:
    STATE_OK=0
    STATE_WARNING=1
    STATE_CRITICAL=2
    STATE_UNKNOWN=3
    STATE_DEPENDENT=4

note that nagios only accepts one line of output so if the plugin’s output begins with \n you will have the type of problem you are describing

you can also find out more info about nrpe_nt at:
forum.miwi-dv.net/nagios/