check_nrpe displaying wrong result


#1

Hi Guys,

I am having an issue with check_nrpe displaying the wrong result. NRPE is currently running through xinetd.

On Nagios Server
./check_nrpe -H 192.168.2.90 brings back NRPE v2.5.1

On Nagios server, the command that I am running is
./check_nrpe -H 192.168.2.90 -c check_nhost

it displays the following: Nomination Host : OK < - It should say Nomination Host : Problem

On Remote Server:
./check_wxhost nh
Nomination Host : Problem < - The Right Result

My nrpe.cfg is as follows:

command[check_nhost]=/usr/local/nagios/libexec/check_wxhost nh

It is really weird that it is showing a different results, any suggestions on how to fix this?


#2

what’s check_wxhost? What does it do? what values does it return?

Looks like it’s outputting text (Nomination Host : Problem) but has the wrong return value (which gives the OK).


#3

I just realized something when you stated that Luca, but can check_nrpe monitor exception errors in log files? Or does check_log need to be used for that.

Because I noticed that check_wxhost is greping the log file for the word “error” in it (looking at a log file) is using a if/else statement…if it returns a 0 it will state “Nomination: OK” if it returns a 1 it will echo out “Nomination: Problem”