Sunday, October 4, 2015

NRPE installation and configuration in remote linux host

Nagios remote plugin executor

Step 1: Installation dependancies first 

yum install -y gcc glibc glibc-common gd gd-devel make net-snmp openssl-devel

Step 2: Create Nagios user

useradd nagios
passwd nagios

Step 3: Installation nagios plugins

cd /root/nrpe

Step 4: Extract Nagios plugins, compile and install

tar -xzvf nagios-plugins-2.1.1.tar.gz
ll -l

cd nagios-plugins-2.1.1
make install

chown nagios.nagios /usr/local/nagios
chown -R nagios.nagios /usr/local/nagios/libexec

Step 5: We have to run nrpe agent under the xinted service

yum install xinetd

Step 6: Download and install NRPE package

cd /root/nrpe

tar xzf nrpe-2.15.tar.gz
cd nrpe-2.15

make all
make install-plugin
make install-daemon
make install-daemon-config
make install-xinetd

Step 7: Configure the NRPE service

Now open /etc/xinetd.d/nrpe file and add the localhost and IP address of the Nagios Monitoring Server.

Open /etc/services
nrpe            5666/tcp                 NRPE

service xinetd restart

Step 8: Verify NRPE is listening 

netstat -at | grep nrpe

Step 9: Configure the Firewall to allow the NRPE port number

iptables -A INPUT -p tcp -m tcp --dport 5666 -j ACCEPT
service iptables save


No comments:

Post a Comment