First of all: I did a researh before asking the question but I could not find the answer to my problem
Im begun to work on this new job administrating a network, and I decided that the services can be improved, so I did a research and find Nagios (a software that I have heard a lot in my college years) and I decided to install nagios to monitorize my server and PCs's stats and their services. I have a Proxmox server where all my servers live, so all the mentioned servers are Proxmoxs VMs.
So far so good, I installed Nagios core on a Debian 10 VM, I added some Windows and Debian hosts via (obviously) nrpe and all work flawlessly, but as soon as I try to install nrpe on a Ubuntu 18.10 the problems start.
The steps to install nrpe on a host are quite simple to follow:
Code: Select all
sudo apt-get update
sudo apt-get install nagios-nrpe-server monitoring-plugins
nano /etc/nagios/nrpe.cfg
Code: Select all
server_address=127.0.0.1, 192.168.0.225 (IP of the host)
allowed_hosts=127.0.0.1,::1,192.168.0.220 (IP of the Nagios core server)
Code: Select all
nano /etc/nagios/nrpe_local.cfg
Code: Select all
command[check_root]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /
command[check_ping]=/usr/lib/nagios/plugins/check_ping -H 192.168.0.225 -w 100.0,20% -c 500.0,60% -p 5
command[check_ssh]=/usr/lib/nagios/plugins/check_ssh -4 192.168.0.225
command[check_http]=/usr/lib/nagios/plugins/check_http -I 192.168.0.225
command[check_apt]=/usr/lib/nagios/plugins/check_apt
Code: Select all
sudo /etc/init.d/nagios-nrpe-server restart
[ ok ] Restarting nagios-nrpe-server (via systemctl): nagios-nrpe-server.service.
Code: Select all
sudo /etc/init.d/nagios-nrpe-server status
Code: Select all
* nagios-nrpe-server.service - Nagios Remote Plugin Executor
Loaded: loaded (/lib/systemd/system/nagios-nrpe-server.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2021-03-16 13:06:48 UTC; 32s ago
Docs: http://www.nagios.org/documentation
Process: 8291 ExecStopPost=/bin/rm -f /var/run/nagios/nrpe.pid (code=exited, status=0/SUCCESS)
Process: 8273 ExecStart=/usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -f $NRPE_OPTS (code=exited, status=1/FAILURE)
Main PID: 8273 (code=exited, status=1/FAILURE)
Mar 16 13:06:48 TeamSpeak systemd[1]: Started Nagios Remote Plugin Executor.
Mar 16 13:06:48 TeamSpeak nrpe[8273]: Starting up daemon
Mar 16 13:06:48 TeamSpeak nrpe[8273]: bad addr or host: 127.0.0.1,192.168.0.221 (Name or service not known)
Mar 16 13:06:48 TeamSpeak systemd[1]: nagios-nrpe-server.service: Main process exited, code=exited, status=1/FAILURE
Mar 16 13:06:48 TeamSpeak systemd[1]: nagios-nrpe-server.service: Failed with result 'exit-code'.
And change:
Code: Select all
server_address=127.0.0.1
Code: Select all
sudo /usr/lib/nagios/plugins/check_nrpe -H 192.168.0.221
connect to address 192.168.50.221 port 5666: Connection refused
connect to host 192.168.50.221 port 5666: Connection refused
So... What am I doing wrong? I guess it's something simple that Im not able to see, but I cant find where is my error, can you guys help me?