In our previous tutorial, you have leaned about to install Nagios server on a Ubuntu 20.04 LTS system.

This guide will help you to install NRPE on Ubuntu 20.04 LTS Linux systems.

Step 1 – Install Nagios Client on Ubuntu

NRPE packages are available under the default repositories on Ubuntu systems. Open a terminal and run the following command to install: Here nagios-nrpe-server package install service on system and nagios-plugins provides monitoring scripts, which is called with NRPE client on request of Nagios server.

Step 2 – Configure Nagios Client

In NRPE configuration, first we need to nrpe to which nagios servers it accepts requests, For example your Nagios server IP is 192.168.1.100, then add this IP to allowed hosts list. Edit NRPE configuration file /etc/nagios/nrpe.cfg and make the necessary changes like below: We can allow multiple Nagios servers by a comma-separated list. Next, restart NRPE service. Now it is ready to listen to requests from Nagios server

Step 3 – Verify Connection from Nagios

Let’s verify the connection between the Nagios server and NRPE client machine. Login to your Nagios server and check the Nagios server can communicate with NRPE service properly. Use check_nrpe command on the Nagios server under the plugins directory. The command will be like as below here 192.168.1.11 is the IP address of client machine. The output “NRPE v2.15” shows that the Nagios server successfully communicated with NRPE.

Step 4 – Update Command Definitions for NRPE

You must have define all the commands to be used by Nagios server. Some of them are pre-configured with the installation. You may required to change command definitions as per your system’s configuration. Also, you can add more customized commands to monitor your server. Edit the /etc/nagios/nrpe.cfg configuration file and search for COMMAND DEFINITIONS secitons. Here you can define or update check commands. Save the configuration file and restart NRPE daemon to apply changes: All done.

Step 5 – Adjust Firewall

The default NRPE service listen on port 5666. Use the following commands to open firewall port for NRPE service.

Conclusion

This tutorial describes you the steps to install NRPE client on Ubuntu system. Also provides you instructions to add check command definitions.

How to Install Nagios Client  NRPE  on Ubuntu 20 04   TecAdmin - 9