NRPE: Unable to read output with check_connections plugin
Posted
by
Wlodzimierz
on Server Fault
See other posts from Server Fault
or by Wlodzimierz
Published on 2012-07-06T10:23:20Z
Indexed on
2012/07/09
9:17 UTC
Read the original article
Hit count: 332
I'm using plugin which gives me warning or crtis with established connections. If I run it on local machine it gives:
*root@graber:/usr/lib/nagios/plugins# ./check_connections -w 1 -c 5 -C sshd
CRITICAL Established connections: 6*
I know, I run as root. But:
Rights to the file:
root@graber:/usr/lib/nagios/plugins# ls -all check_connections
-rwxr-xr-x 1 nagios nagios 5459 2012-07-06 10:19 check_connections
/etc/sudoers:
root@graber:/usr/lib/nagios/plugins# cat /etc/sudoers
Defaults env_reset
root ALL=(ALL:ALL) ALL
%admin ALL=(ALL) ALL
nagios ALL=(ALL) NOPASSWD: /usr/bin/lsof
nagios ALL=(ALL) NOPASSWD: /usr/lib/nagios/plugins/
/etc/nagios/nrpe.cfg:
*nrpe_user=nagios
nrpe_group=nagios*
*dont_blame_nrpe=1*
*command_prefix=/usr/bin/sudo
command[check_connections]=/usr/lib/nagios/plugins/check_connections -w 1 -c 5 -C sshd*
log from remote:
*2012-07-06T11:12:49+02:00 graber nrpe[25928]: Handling the connection...
2012-07-06T11:12:49+02:00 graber nrpe[25928]: Host address is in allowed_hosts
2012-07-06T11:12:49+02:00 graber nrpe[25928]: Host is asking for command 'check_connections' to be run...
2012-07-06T11:12:49+02:00 graber nrpe[25928]: Running command: /usr/lib/nagios/plugins/check_connections -w 1 -c 5 -C sshd
2012-07-06T11:19:11+02:00 graber nrpe[26100]: Return Code: 2, Output: NRPE: Unable to read output*
Why is this happening? I'm out of ideas, I've searched google for 2 days now :)
© Server Fault or respective owner