Wednesday 31 May 2017

How To Install NRPE On Redhat or CentOS Linux Server


Need personal assistance on Nagios? Please contact me at

immukesh72@gmail.com

at very nominal charges

Step 01: Install NRPE Plugins in Nagios monitoring host

wget http://downloads.sourceforge.net/project/nagios/nrpe-2.x/nrpe-2.15/nrpe-2.15.tar.gz

tar -zxvf nrpe-2.15.tar.gz

cd nrpe-2.15

./configure --enable-command-args --with-nagios-user=nagios --with-nagios-group=nagios --with-ssl=/usr/bin/openssl --with-ssl-lib=/usr/lib/x86_64-linux-gnu

Now build and install NRPE and its xinetd startup script with these commands:
make all
sudo make install
sudo make install-xinetd
sudo make install-daemon-config
  
Step 01: On client server that you want to monitor, install the EPEL repository:
    NRPE packages and plugins are available under epel yum repository
sudo yum install epel-release
or
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
RPM (Red Hat Package Manager) is an default open source and most popular package management utility for Red Hat based systems like (RHEL, CentOS and Fedora). The tool allows system administrators and users to install, update, uninstall, query, verify and manage system software packages in Unix/Linux operating systems.
   
Now install Nagios Plugins and NRPE:
yum --enablerepo=epel -y install nrpe nagios-plugins
update private IP address of your Nagios server in allowed host
sudo vi /etc/nagios/nrpe.cfg
allowed_hosts=127.0.0.1,10.132.224.168

Add new commands or update existing commands like below in same file.
 command[check_root_disk]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /
 command[check_load]=/usr/lib/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
Step 02: Start NRPE Service:
Reboot nrpe once to read new configuration, Also configure nrpe to auto start on system boot.
service nrpe start
chkconfig nrpe on
Step 03: Test NRPE from Nagios server
Login to Nagios server and run the following command. On successful connection it will print the version of nrpe package.
/usr/local/nagios/libexec/check_nrpe -H 10.132.224.168
NRPE v2.15
Need personal assistance on Nagios? Please contact me at

immukesh72@gmail.com

at very nominal charges

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...