Installing NRPE
- Refresh the repository:
sudo apt-get update
- Install the dependencies:
sudo apt-get install libssl-dev -y
- Change the directory to your home directory:
cd ~
- Download the nrpe 4 source codes:
wget https://github.com/NagiosEnterprises/nrpe/releases/download/nrpe-4.0.3/nrpe-4.0.3.tar.gz
- Extract the downloaded source codes:
tar xvf nrpe-4.0.3.tar.gz
- Change to the directory of the newly extracted source codes:
cd nrpe-4.0.3
- Run the configure script:
./configure
- Compile the check_nrpe plugin only:
sudo make check_nrpe
- Install the newly compiled plugin:
sudo make install-plugin
- Update the file /usr/local/nagios/etc/objects/commands.cfg to add the following entry:
define command { command_name check_nrpe command_line /usr/local/nagios/libexec/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$ }
Testing The Plugin
Using the command check_nrpe we can check the load on the host 10.0.0.202 (i.e. NRPE daemon must be configured and listening on port 5666) using the following command:
/usr/local/nagios/libexec/check_nrpe -H 10.0.0.202 -c check_load
Expect to see the output of the check_load plugin executed on the host 10.0.0.202
Recent Comments