Installing NRPE
-
- Refresh the repository:
sudo apt-get update
- Install the dependencies:
sudo apt-get install autoconf automake gcc libc6 libmcrypt-dev make libssl-dev wget openssl -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 that enables the command arguments for clients and uses ssl library:
sudo ./configure --enable-command-args --with-ssl-lib=/usr/lib/x86_64-linux-gnu/
- Compile the source codes:
sudo make all
- Install the nagios user and group:
sudo make install-groups-users
- Install both NRPE daemon and check_nrpe plugin:
sudo make install
- Install the nrpe config file (i.e. /usr/local/nagios/etc/nrpe.cfg):
sudo make install-config
- Install the init script:
sudo make install-init
- Enable the nrpe daemon:
sudo systemctl enable nrpe.service
- Update allowed_hosts field in the /usr/local/nagios/etc/nrpe.cfg file: to include your nagios server address (e.g. your nagios server address is 10.0.0.174 the allowed hosts is as follows):
allowed_hosts=127.0.0.1,::1,10.0.0.174
- Update the dont_blame_nrpe field: to 1 on the same configuration file to allow your clients to specify arguments:
dont_blame_nrpe=1
- Start the nrpe daemon:
sudo systemctl start nrpe.service
The NRPE service is listening with the port 5666 by default.
- Refresh the repository:
Testing The NRPE Plugin
/usr/local/nagios/libexec/check_nrpe -H localhost
Expect to see the version of NRPE daemon
Related Post
Compiling NRPE 4 Plugin to Tinkerboard
Compiling Nagios Plugin 2.3.3 to Ubuntu 20.04
Leave a Reply