Page 1 of 1

check_tcptraffic v2.2.4 + check_nrpe v2.12

Posted: Tue Apr 24, 2012 6:11 pm
by thundercon
I have been using check_tcptraffic with NRPE for a while now on some of the FC15 linux web servers I manage. Recently I decided to try out FC16 for a recent project and this is the issue I'm having.

Code: Select all

# Manually running check_tcptraffic from nagios user (NRPE is configured to use this user)
[nagios@web1 libexec]$ ./check_tcptraffic -c 3670016 -w 3145728 -i eth0 -s 100
TCPTRAFFIC OK - eth0 467 bytes/s | TOTAL=467B;3145728;3670016 IN=212B;; OUT=255B;; TIME=13B;;

# Running check_load from check_nrpe v2.12
[nagios@web1 libexec]$ ./check_nrpe -H localhost -c check_load
OK - load average: 0.00, 0.01, 0.05|load1=0.000;15.000;30.000;0; load5=0.010;10.000;25.000;0; load15=0.050;5.000;20.000;0;

# Running check_tcptraffic from check_nrpe v2.12
[nagios@web1 libexec]$ ./check_nrpe -H localhost -c check_traffic
NRPE: Unable to read output

# Command used in nrpe.cfg
command[check_traffic]=/usr/local/nagios/libexec/check_tcptraffic -c 3670016 -w 2883584 -i eth0 -s 100

# Relevant logs in /var/log/messages with debugging=1 enabled in nrpe.cfg and daemon.debug enabled in rsyslog.conf
Apr 24 21:57:34 web1 nrpe[14859]: Added command[check_traffic]=/usr/local/nagios/libexec/check_tcptraffic -c 3670016 -w 2883584 -i eth0 -s 100
Apr 24 21:57:34 web1 nrpe[14859]: INFO: SSL/TLS initialized. All network traffic will be encrypted.
Apr 24 21:57:34 web1 nrpe[14859]: Handling the connection...
Apr 24 21:57:34 web1 nrpe[14859]: Host is asking for command 'check_traffic' to be run...
Apr 24 21:57:34 web1 nrpe[14859]: Running command: /usr/local/nagios/libexec/check_tcptraffic -c 3670016 -w 2883584 -i eth0 -s 100
Apr 24 21:57:34 web1 nrpe[14859]: Command completed with return code 2 and output:
Apr 24 21:57:34 web1 nrpe[14859]: Return Code: 2, Output: NRPE: Unable to read output
I have verified all relevant permissions, the script completes successfully when manually executed from the nagios user. I'm really not sure what's going on here, I've configured this plugin several times without this issue. I feel like it might be related to a change in FC16 but I can't figure out what specifically is wrong. Any help from the community would be greatly appreciated.

check_tcptraffic
http://exchange.nagios.org/directory/Pl ... ic/details

check_nrpe
http://exchange.nagios.org/directory/Ad ... or/details

Re: check_tcptraffic v2.2.4 + check_nrpe v2.12

Posted: Wed Apr 25, 2012 1:50 pm
by agriffin
It could be due to an SELinux policy change. Does it work if you temporarily disable SELinux?

Re: check_tcptraffic v2.2.4 + check_nrpe v2.12

Posted: Wed Apr 25, 2012 5:56 pm
by thundercon
agriffin wrote:It could be due to an SELinux policy change. Does it work if you temporarily disable SELinux?
SELinux isn't enabled

Code: Select all

[root@web1 ~]# getenforce
Disabled

Re: check_tcptraffic v2.2.4 + check_nrpe v2.12

Posted: Fri Apr 27, 2012 10:25 am
by agriffin
I'm not really what would cause this. It may be regression in the latest check_tcptraffic release, since you were probably using an older version of check_tcptraffic before in addition to an older version of Fedora. Try downloading an older version from here and see if that helps.

Re: check_tcptraffic v2.2.4 + check_nrpe v2.12

Posted: Fri Apr 27, 2012 10:49 am
by agriffin
A similar issue came up on the nagios-users mailing list recently. A workaround was to make sure the nagios user can login with a password and that it has a normal default shell. If that's not already the case try making those changes (even though NRPE should be able to function otherwise, and this is likely not the whole story).