Hello,
I have installed the NRPE plugin on a couple remote hosts using the following guide:
https://assets.nagios.com/downloads/nag ... _Agent.pdf
After following those steps and adding the standard checks in NagiosXI>Configuration Wizard, all of my checks (except ping) give the same error:
"CHECK_NRPE: Error - Could not connect to 192.168.1.xxx: Connection reset by peer"
I have tried everything in the following article but this did not resolve the issue:
https://support.nagios.com/kb/article/n ... e-615.html
I have followed the XINETD steps as we appear to be utilizing this service.
Does anyone have any suggestions? Is xinetd needed, or is there a way to use nrpe without xinetd?
Thanks so much for the help.
Issues after installing NRPE - Connection reset by peer
-
opensource300
- Posts: 2
- Joined: Fri Oct 05, 2018 2:27 pm
Re: Issues after installing NRPE - Connection reset by peer
Could you please double check that the IP address for only_from is specified correctly in the '/etc/xinetd.d/nrpe'?
It should look similar to:
where the IP address is the XI server address. I would like to emphasize that the value for only_from is a space-delimited list, not comma.
Also it is easy to forget to restart the xinetd service. The changed configuration will not take effect unless it is restarted.
It's also possible that nrpe traffic from the XI is being blocked by a firewall if you have one enabled. NRPE by default uses port 5666.
For example, in the case of iptables, you can add a rule to accept the nrpe traffic from the XI like below.
It should look similar to:
Code: Select all
service nrpe
{
disable = no
per_source = 25
...
only_from= 127.0.0.1 192.168.xxx.xxx
}
Also it is easy to forget to restart the xinetd service. The changed configuration will not take effect unless it is restarted.
Code: Select all
service xinetd restart
For example, in the case of iptables, you can add a rule to accept the nrpe traffic from the XI like below.
Code: Select all
iptables -A INPUT -p tcp -s 192.168.xxx.xxx --dport 5666 -j ACCEPT
-
opensource300
- Posts: 2
- Joined: Fri Oct 05, 2018 2:27 pm
Re: Issues after installing NRPE - Connection reset by peer
We used Icinga to monitor in the past. Is any additional configuration needed after utilizing Icinga in the past? It seems a lot of configs/files are similar which might be causing conflicts?
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Issues after installing NRPE - Connection reset by peer
It is possible, while some of those configs may be similar, that is a different project not supported by us and may have configs that are incompatible.opensource300 wrote:We used Icinga to monitor in the past. Is any additional configuration needed after utilizing Icinga in the past? It seems a lot of configs/files are similar which might be causing conflicts?