benjaminsmith wrote:Hello
@Eudes87,
Let's start by getting it working with the CentOS server. Double check the nrpe.cfg that you have added the Nagios server IP address to the allowed_hosts field.
Code: Select all
allowed_hosts=127.0.0.1,<Nagios XI server ip>
Hello
@benjaminsmith,
The "allow" line had space because I saw this article.
https://support.nagios.com/kb/article/n ... e-615.html
I changed the nrpe.cfg file delimited by comma.
Then verify that nrpe is running on the server and try once more.
Code: Select all
systemctl status xinetd
# OR... depending on how NRPE was installed
systemctl status nrpe
It's all right about the service apparently.
Code: Select all
# systemctl status nrpe
● nrpe.service - Nagios Remote Program Executor
Loaded: loaded (/usr/lib/systemd/system/nrpe.service; enabled; vendor preset: disabled)
Active: active (running) since Sex 2019-10-25 08:38:14 -03; 3s ago
Docs: http://www.nagios.org/documentation
Process: 3216 ExecStopPost=/bin/rm -f /var/run/nrpe/nrpe.pid (code=exited, status=0/SUCCESS)
Main PID: 3217 (nrpe)
CGroup: /system.slice/nrpe.service
└─3217 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -f
Out 25 08:38:14 fileserver.dexter.com.br systemd[1]: Stopped Nagios Remote Program Executor.
Out 25 08:38:14 fileserver.dexter.com.br systemd[1]: Started Nagios Remote Program Executor.
Out 25 08:38:14 fileserver.dexter.com.br nrpe[3217]: Starting up daemon
Out 25 08:38:14 fileserver.dexter.com.br nrpe[3217]: Server listening on 0.0.0.0 port 5666.
Out 25 08:38:14 fileserver.dexter.com.br nrpe[3217]: Server listening on :: port 5666.
Out 25 08:38:14 fileserver.dexter.com.br nrpe[3217]: Listening for connections on port 5666
Out 25 08:38:14 fileserver.dexter.com.br nrpe[3217]: Allowing connections from: 127.0.0.1,10.xxx.x0.xxx
As for the compilation, I don't know if you used "./configure --enable-command-args".
This machine was already being monitored and it wasn't me who installed the plugin on this machine.
I ran the command below on the nagios server for host centos and this time it worked.
Code: Select all
# /usr/local/nagios/libexec/check_nrpe -H 10.xxx.xx.xxx
NRPE v3.2.1
Funny that I did a comma delimiting test, changed the file, restarted the nrpe service and it didn't work.
Is it also necessary to restart the host?
Problem persists when running command (Nagios Server and Windows machine)