Im working on opensuse Leap 42.1. I have installed NRPE on the remote host. I following precisely the installation guide. However, the deaemon runs:
netstat -at | egrep "nrpe|5666"
tcp 0 0 *:nrpe *:* LISTEN
tcp 0 0 *:nrpe *:* LISTEN
But executing CHECK_NRPE gives me the following error:
/usr/local/nagios/lib/check_nrpe -H localhost
CHECK_NRPE: Error - Could not connect to ::e298:8aF0:2cdf:0: Connection reset by peer
I dont see what is the problem here. I tried the installation several times. Firewall is off, but that shouldn't be the problem. Haven't found the error anywhere else. What am I missing? Thanks
If the server has a firewall running, you need to allow access to the NRPE port (5666) from the Nagios server. On other systems and other firewalls, check the documentation or have an administrator open the port.
To anyone who is accidentally stumbled upon this article and still wondering what is NRPE stands for — It stands for Nagios Remote Plugin Executor :) © realnets.com. NRPE is used to execute Nagios plugins on remote clients. It is very useful if you want to monitor remote clients or get metrics of remote clients.
NRPE allows you to remotely execute Nagios plugins on other Linux/Unix machines. This allows you to monitor remote machine metrics (disk usage, CPU load, etc.). NRPE can also communicate with some of the Windows agent addons, so you can execute scripts and check metrics on remote Windows machines as well.
Nagios Remote Plugin Executor (NRPE) is a Nagios agent that allows remote system monitoring using scripts that are hosted on the remote systems. It allows for monitoring of resources such as disk usage, system load or the number of users currently logged in.
I had the same problem.
Just, look the file: /etc/xinetd.d/nrpe
Now, find (almost at beggining) the line that says
"disable = yes"
and simply change it to "no", then:
# systemctl restart xinetd.service
# systemctl restart nrpe
or # service nrpe restart
(if not systemd)
Testing on debian 8 with last nrpe installation guide.
Hope it helps!
PS: Don't forget the directive.
"only_from = (...)"
EDIT:
In the last NRPE installation on debian 8 you have to:
Edit: /usr/local/nagios/etc/nrpe.cfg
line 98: allowed_hosts=x.x.x.x
And in the /etc/xinetd.d/nrpe let the directive "disable
" in "yes
". (default)
It seems like nrpe service look at allowed hosts in /usr/local/nagios/etc/nrpe.cfg instead of /etc/xinetd.d/nrpe.
Because in the /etc/xinetd.d/nrpe there is this line:
server_args = -c /usr/local/nagios/etc/nrpe.cfg --inetd
Now, yes:
# systemctl restart nrpe.service && systemctl restart xinetd.service
in my case the issue was only i need to stop nrpe process and start again
ps aux | grep nrpe
kill xxxx
run nrpe service
/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With