nrpe: Host is not allowed to talk to us
Solution 1:
Had the same entry in my syslog
.
Editing /etc/nagios/nrpe.cfg
and enter missing IP will fixed it at all.
allowed_hosts=1.2.3.4/24,127.0.0.1
After editing you have to restart or even reload nrpe
deamon.
/etc/init.d/nagios-nrpe-server reload
Check if it is all fine with your configuration. Syslog should have an entry like this:
Allowing connections from: 1.2.3.4/24,127.0.0.1
I advise you not to add user nagios to sudoers because of security issues.
Solution 2:
A lot of how-to's here and there ask you to allow your monitoring server IP like this in your host's /etc/nagios/nrpe.cfg
:
allowed_hosts=127.0.0.1, 1.2.3.4
On some distribs (Ubuntu 14.04 LTS for instance), it's working. On other (Ubuntu 12.04 LTS - tested on Microsoft Azure in my case), it does not.
Just remove the space before second IP :
allowed_hosts=127.0.0.1,1.2.3.4
Then, of course, restart your host's nrpe service :
$ service nagios-nrpe-server restart
Solution 3:
I found the solution, but the error message is totally misleading. The user nagios has to be in the suders...
/etc/sudoers:
nagios ALL=(ALL) NOPASSWD: /usr/lib/nagios/plugins/