I hope you know to install Nagios monitoring server on CentOS, this post describes to configure the Nagios client in Ubuntu machine. Its, very simple steps to install,
Create a new user with password : nagios
# adduser nagios
Update and install necessary packages,
# sudo apt-get update -y
# sudo apt-get install gcc perl libtool openssl libssl-dev -y
Download Nagios-Plugin and nrpe latest version,
# wget http://www.nagios-plugins.org/download/nagios-plugins-2.1.1.tar.gz
# wget http://liquidtelecom.dl.sourceforge.net/project/nagios/nrpe-2.x/nrpe-2.15/nrpe-2.15.tar.gz
Extract the Nagios-plugins package and configure,
# tar -zxvf nagios-plugins-2.1.1.tar.gz
# cd /root/nagios-plugins-2.1.1
# ./configure
# make
# make install
Change ownership on below directories
# chown -R nagios.nagios /usr/local/nagios
# chown -R nagios.nagios /usr/local/nagios/libexec
Install xinetd package,
# apt-get install xinetd -y
check the xinetd status and start it if doesn't start.
# service xinetd status
# service xinetd start
Now, extract nrpe package and install
# tar -zxvf /root/nrpe-2.15.tar.gz
# cd /root/nrpe-2.15
# ./configure --with-ssl=/usr/bin/openssl --with-ssl-lib=/usr/lib/x86_64-linux-gnu
# make all
# make install-plugin
# make install-daemon
# make install-daemon-config
# make install-xinetd
Installation process has been completed, let begin to configure,
You need to add the below line in services file
# vim /etc/services
nrpe 5666/tcp # NRPE
Note : Assume that suppose to your Nagios IP address is 192.168.10.10,
open nrpe file and add nagios IP Address
# vim /etc/xinetd.d/nrpe
only_from = 127.0.0.1 192.168.10.10
Open main configure file in remote-client nrpe.cfg, append Nagios-server ip to allowed_host
# vim /usr/local/nagios/etc/nrpe.cfg
allowed_hosts=127.0.0.1
Comments (0)