Step 1 – Install EPEL Repository
NRPE packages and plugins are available under EPEL yum repository, Enable EPEL repository using one of below commands.
Step 2 – Install NRPE and Nrpe-plugins
After enabling EPEL repository, use following commands to install NRPE and plugins in your system. We also need to install commands which NRPE executes for monitoring services. Use the following command to get a list of available commands packages. Install the required packages on your remote system.
Step 3 – Configure NRPE
First, we need to edit NRPE configuration file and start the configuration to work properly. Add your Nagios server ip with allowed_hosts like below, For example Nagio server ip is 192.168.1.110. After adding above entry you will see that Nagios server is able to connect NRPE client. Let add commands to monitor services. Add new commands or update existing commands like below in the same file. You can add more commands like above as per requirement of monitoring.
Step 4 – Start NRPE Service
After making all changes, reboot NRPE once to read new configuration, Also configure NRPE to autostart on system boot.
Step 5 – Test NRPE from Nagios Server
Login to Nagios server and execute the following command to verify that Nagios server is able to connect to clients NRPE services. On successful connection, it will show version of clients NRPE package. For example, your remote system IP is 192.168.1.20 with NRPE installed.