Centos install nrpe nagios-plugin

Create Nagios user account on remote server to be monitored:

# useradd nagios
# passwd nagios

Install xinetd:

yum -y install xinetd
chkconfig xinetd on

Download and Install Nagios Plugins:

we can download nagios-plugins from http://www.nagios.org/download/download.php

# wget http://www.nagios.org/download/download.php

extract the files then complie and config nagios-plugins

#tar -xzvf nagios-plugins-x.x.xx.tar.gz
#cd nagios-plugins-x.x.xx
#make all
#make install

Downlad and Install NRPE Daemon

As of this writing NRPE 2.12 (Stable)

Extract the Files:

# tar -xzf nrpe-2.12.tar.gz
# cd nrpe-2.12

Compile and Configure NRPE

** You need the openssl-devel package installed to compile NRPE with ssl support. **

# yum -y install openssl-devel

Install NRPE:

# ./configure

General Options:
 NRPE port:    5666
 NRPE user:    nagios
 NRPE group:   nagios
 Nagios user:  nagios
 Nagios group: nagios

# make all

# make install-plugin

# make install-daemon

# make install-daemon-config

# make install-xinetd

Post NRPE Configuration

Edit Xinetd NRPE entry:

Add Nagios Monitoring server to the “only_from” directive

# vi /etc/xinetd.d/nrpe

only_from = <nagios_ip_address>

Edit services file entry:

Add entry for nrpe daemon

# vi /etc/services

nrpe      5666/tcp    # NRPE

Restart Xinetd and Set to start at boot:

# chkconfig xinetd on

# service xinetd restart

Test NRPE Daemon Install

Check NRPE daemon is running and listening on port 5666:

# netstat -at |grep nrpe

Output should be:

tcp    0    0 *:nrpe    *.*    LISTEN

Check NRPE daemon is functioning:

# /usr/local/nagios/libexec/check_nrpe -H localhost

Output should be NRPE version:

NRPE v2.12

Open Port 5666 on Firewall

Make sure to open port 5666 on the firewall of the remote server so that the Nagios monitoring server can access the NRPE daemon.




WordPress.com Logo

您的留言將使用 WordPress.com 帳號。 登出 /  變更 )

Google+ photo

您的留言將使用 Google+ 帳號。 登出 /  變更 )

Twitter picture

您的留言將使用 Twitter 帳號。 登出 /  變更 )


您的留言將使用 Facebook 帳號。 登出 /  變更 )


連結到 %s