check_nrpe returning error code 255 when connection refused
Posted: Thu Jul 16, 2015 7:02 pm
I have been trialling the Nagios XI appliance (2014R2.7) and have noticed that check_nrpe returns error code 255 if the remote nrpe agent is not running. I would have expected this to be a 2 (CRITICAL).
For example:
[root@nagiosxi-64 ~]# /usr/local/nagios/libexec/check_nrpe -H MYIPADDRESS
connect to address MYIPADDRESS port 5666: Connection refused
connect to host MYIPADDRESS port 5666: Connection refused
[root@nagiosxi-64 ~]# echo $?
255
MYIPADDRESS is a server with the nrpe agent installed but *not running*. When the agent is running, it works as expected. The problem is specifically that when check_nrpe gets "connection refused", it returns 255.
When nagios executes these check, it isn't able to interpret 255, so the check status is:
(Return code of 255 is out of bounds)
The version of check_nrpe included with the appliance is 2.15.
It looks like this problem has been addressed in this pull request from October 2014:
https://github.com/NagiosEnterprises/nrpe/pull/13
Is this fix likely to be incorporated into the version of check_nrpe that is shipped with Nagios XI?
Many thanks.
--
Chris
For example:
[root@nagiosxi-64 ~]# /usr/local/nagios/libexec/check_nrpe -H MYIPADDRESS
connect to address MYIPADDRESS port 5666: Connection refused
connect to host MYIPADDRESS port 5666: Connection refused
[root@nagiosxi-64 ~]# echo $?
255
MYIPADDRESS is a server with the nrpe agent installed but *not running*. When the agent is running, it works as expected. The problem is specifically that when check_nrpe gets "connection refused", it returns 255.
When nagios executes these check, it isn't able to interpret 255, so the check status is:
(Return code of 255 is out of bounds)
The version of check_nrpe included with the appliance is 2.15.
It looks like this problem has been addressed in this pull request from October 2014:
https://github.com/NagiosEnterprises/nrpe/pull/13
Is this fix likely to be incorporated into the version of check_nrpe that is shipped with Nagios XI?
Many thanks.
--
Chris