I'm trying to use check_nrpe
to check on a remote server, but it's not working and I can't figure out what am I missing...
# /usr/lib/nagios/plugins/check_nrpe -H XXX -c check_load -a 6,5,4 8,7,6
NRPE: Unable to read output
#
remote's server syslog message:
nrpe[18058]: Connection from XX.XX.XX.XX port 16267
nrpe[18058]: Host address is in allowed_hosts
nrpe[18058]: Handling the connection...
nrpe[18058]: Host is asking for command 'check_load' to be run...
nrpe[18058]: Running command: /usr/bin/sudo /usr/lib64/nagios/plugins/check_load -w 6,5,4 -c 8,7,6
nrpe[18058]: Command completed with return code 1 and output:
nrpe[18058]: Return Code: 1, Output: NRPE: Unable to read output
nrpe[18058]: Connection from XX.XX.XX.XX closed.
to verify it manually, I issue same command on a remote shell:
bash-4.1$ id
uid=497(nrpe) gid=497(nrpe) groups=497(nrpe) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
bash-4.1$ /usr/bin/sudo /usr/lib64/nagios/plugins/check_load -w 6,5,4 -c 8,7,6
OK - load average: 0.21, 0.23, 0.19|load1=0.210;6.000;8.000;0; load5=0.230;5.000;7.000;0; load15=0.190;4.000;6.000;0;
bash-4.1$