Nagios how to add host – The way we do it!!
Are you using Nagios and not sure how to add host in it? We can help you with it.
Nagios is a “plugin”-based approach to monitoring. NRPE – the Nagios Remote Plugin Executor is an answer for Nagios how to add host?
At Bobcares, we often get requests to add hosts to Nagios, as a part of our Server Management Services.
Today, let’s see how our Support Engineers add hosts in Nagios.
A quick look on Nagios
Nagios is a monitoring software tool. It mainly helps in monitoring systems, networks, and infrastructure.
Also, it monitors the server and troubleshoot server performance issues.
Nagios how to add host?
Monitoring systems like Nagios is very essential for monitoring uptime, disk space, CPU usage, etc; so that we can avoid problems before they occur. We use NRPE to add hosts. NRPE is a Nagios agent which helps in monitoring using scripts hosted on the remote systems.
Let’s see how our Support Engineers manually add new hosts to Nagios.
Add Linux hosts to Nagios
Recently, one of our customers approached us with the request to add hosts to his Nagios monitoring. Let’s now go through the steps that we followed.
Firstly, we installed Nagios NRPE using the command as below:
apt-get install nagios-nrpe-server nagios-plugins
After successfully installing NRPE and Nagios plugins, we configured NRPE. For that, we opened its configuration file which is located at /etc/nagios/nrpe.cfg
Then, in the server_address attribute, we appended the host IP as shown in the screenshot below.
There we added the Nagios server IP in ‘allowed_hosts‘ attribute.
Then, we saved the configuration and restarted the NRPE service.
systemctl restart nagios-nrpe-server systemctl enable nagios-nrpe-server
We also opened the port 5666 which is used by the NRPE plugin on the firewall of the Nagios server.
ufw allow 5666/tcp ufw reload
Finally, we successfully added the host to Nagios for our customer.
[Need assistance in adding hosts to Nagios? – We’ll help you.]
In conclusion, we discussed in detail how to add host to Nagios, and we also saw how our Support Engineers add host to Nagios for our customers.