lmiltchev wrote:How did you install NRPE on the client (from source, repo)? Are you running NRPE as a "standalone" daemon or under xinetd?
Run the following commands on the remote box and show us the output:
Code: Select all
ps axuw | grep nrpe
netstat -at | grep nrpe
grep allowed_hosts /path/to/the/nrpe.cfg
Did you restart nrpe after adding the nagios IP address on the "allowed_hosts" line?
Thanks for the reply.
As mentioned in my original post i installed NRPE from the EPEL repo.
I am running nrpe client in standalone mode without xinetd
The result of the requested commands returned:
Code: Select all
ps axuw | grep nrpe
nrpe 10866 0.0 0.2 41464 1412 ? Ss Nov18 0:03 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d
The command
netstat -at |grep nrpe returned nothing so i changed it to
netstat -apt | grep nrpe to give the grep something to find
Code: Select all
netstat -apt | grep nrpe
tcp 0 0 *:5666 *:* LISTEN 10866/nrpe
tcp 0 0 *:5666 *:* LISTEN 10866/nrpe
Code: Select all
grep allowed_hosts /etc/nagios/nrpe.cfg
allowed_hosts=127.0.0.1,172.16.200.105
I have also tried telnet from the nagios server to port 5666 on the target machine and i can access the port.
Code: Select all
telnet 172.16.200.110 5666
Trying 172.16.200.110...
Connected to 172.16.200.110.
Escape character is '^]'.
I have also run the following commands on the machine
Code: Select all
/usr/lib64/nagios/plugins/check_nrpe -H 127.0.0.1
NRPE v2.15
Code: Select all
/usr/lib64/nagios/plugins/check_nrpe -H 127.0.0.1 -n
CHECK_NRPE: Error receiving data from daemon.
Code: Select all
ldd /usr/sbin/nrpe
linux-vdso.so.1 => (0x00007fff3e4fe000)
libssl.so.10 => /usr/lib64/libssl.so.10 (0x00007ff4fd7d6000)
libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007ff4fd3f3000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x00007ff4fd1d9000)
libwrap.so.0 => /lib64/libwrap.so.0 (0x00007ff4fcfce000)
libc.so.6 => /lib64/libc.so.6 (0x00007ff4fcc3a000)
libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007ff4fc9f5000)
libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007ff4fc70f000)
libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007ff4fc50b000)
libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007ff4fc2de000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007ff4fc0da000)
libz.so.1 => /lib64/libz.so.1 (0x00007ff4fbec4000)
/lib64/ld-linux-x86-64.so.2 (0x00007ff4fda48000)
libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007ff4fbcb8000)
libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007ff4fbab5000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00007ff4fb89b000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ff4fb67d000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x00007ff4fb45e000)
Code: Select all
egrep -v "^#.*$|^$" /etc/nagios/nrpe.cfg
log_facility=daemon
pid_file=/var/run/nrpe/nrpe.pid
server_port=5666
nrpe_user=nrpe
nrpe_group=nrpe
allowed_hosts=127.0.0.1,172.16.200.105
dont_blame_nrpe=0
debug=1
command_timeout=60
connection_timeout=300
include_dir=/etc/nrpe.d
Code: Select all
service nrpe restart; tail -f /var/log/messages
Nov 19 06:29:05 test-centos nrpe[27801]: INFO: SSL/TLS initialized. All network traffic will be encrypted.
Nov 19 06:29:05 test-centos nrpe[27802]: Starting up daemon
Nov 19 06:29:05 test-centos nrpe[27802]: Server listening on 0.0.0.0 port 5666.
Nov 19 06:29:05 test-centos nrpe[27802]: Server listening on :: port 5666.
Nov 19 06:29:05 test-centos nrpe[27802]: Listening for connections on port 0
Nov 19 06:29:05 test-centos nrpe[27802]: Allowing connections from: 127.0.0.1,172.16.200.105
Nagios server
Code: Select all
NRPE Plugin for Nagios
Copyright (c) 1999-2008 Ethan Galstad (nagios@nagios.org)
Version: 2.15
Last Modified: 09-06-2013
License: GPL v2 with exemptions (-l for more info)
I hope some of this information is useful. I am racking my brains trying to find out why this is not working.
I have a CentOS machine with this working but it is running CentOS 6-5 (which i have tried on the VirtutalBox instance with no success).