I am getting the error (Return code of 255 is out of bounds) on the http://localhost/nagios
But whe I run the command from #bash.. It runs fine
any suggestions
Regards
I am getting the error (Return code of 255 is out of bounds) on the http://localhost/nagios
But whe I run the command from #bash.. It runs fine
any suggestions
Regards
A Nagios check should return 0, 1, 2 or 3:
An exit status of 255 is perfectly valid when you run the command manually, so bash won't complain. You can check the exit status of the command in the variable $?
after the command has run with:
echo $?
You mention that you are calling the check command via nrpe. If you are using a check command which returns multi-line output you must use a recent version of nrpe that also supports multi-line output otherwise the check_nrpe script will not be able to parse the output.
If you're using NRPE and receiving a 'NRPE: Unable to read output' error it is because the NRPE daemon is not returning text data. The Nagios core depends on NRPE daemons to return a string that summarizes the results of the checks. For instance, for a check result that is returning a healthy status, it may look like the former whereas an unhealthy status would be displayed the the latter.
OK - load average: 1.56, 1.37, 1.29
CRITICAL - load average: 16.59, 19.41, 21.96
If NRPE were to return something like this:
FOO: bar
You're going to get a 'NRPE: Unable to read output' error because FOO is not one of Nagios's known result states. Run the remote NRPE command by running something like this (depending on your directories and checks):
libexec/check_nrpe -n -H localhost -c check_load
That should return OK, WARNING, CRITICAL, or UNKNOWN. Anything else will cause that error.