How To Install and Configure NRPE on CentOS, Redhat

NRPE is called as ‘Nagios Remote Plugin Executere‘. NRPE allows nagios server to remotely execute plugins on other Linux/Unix machines. NRPE is also available with some windows addons to monitor windows servers.

This article will help you to setup nrpe on systems CentOS and RHEL Systems, which needs to monitor through nagios server.

Step 1. Install EPEL Repository

NRPE packages and plugins are available under epel yum repository, Enable epel repository using one of below commands.

CentOS/RHEL 6, 32 Bit:
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

CentOS/RHEL 6, 64 Bit:
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

CentOS/RHEL 5, 32 Bit:
# rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

CentOS/RHEL 5, 64 Bit:
# rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-releas5-4.noarch.rpm
Step 2. Install NRPE and nrpe-plugins

After adding epel repository, use following commands to install nrpe and plugins in system. It may nrpe installed with name nrpe.

# yum --enablerepo=epel -y install nrpe nagios-plugins

We also need to install commands which nrpe executes for monitoring services. Use following command to get a list of available commands packages. Install the required packages.

# yum --enablerepo=epel -y list nagios-plugins\*


Installed Packages
nagios-plugins.x86_64                           1.4.16-5.el6              @epel
Available Packages
nagios-plugins-by_ssh.x86_64                    1.4.16-5.el6              epel
nagios-plugins-dhcp.x86_64                      1.4.16-5.el6              epel
nagios-plugins-dig.x86_64                       1.4.16-5.el6              epel
nagios-plugins-disk.x86_64                      1.4.16-5.el6              epel
nagios-plugins-fping.x86_64                     1.4.16-5.el6              epel
nagios-plugins-http.x86_64                      1.4.16-5.el6              epel
nagios-plugins-icmp.x86_64                      1.4.16-5.el6              epel
nagios-plugins-linux_raid.x86_64                1.4.16-5.el6              epel
nagios-plugins-load.x86_64                      1.4.16-5.el6              epel
nagios-plugins-log.x86_64                       1.4.16-5.el6              epel
nagios-plugins-mailq.x86_64                     1.4.16-5.el6              epel
Step 3. Configure NRPE

First we need to edit /etc/nagios/nrpe.cfg and start the configuration to work properly.

# vim /etc/nagios/nrpe.cfg
allowed_hosts=127.0.0.1, 192.168.1.110

After adding above entry you will see that nagios server is able to connect nrpe client. Let add commands to monitor services. 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

You can add more commands like above as per requirement of monitoring.

Step 4. Start NRPE Service

After making all changes, reboot nrpe once to read new configuration, Also configure nrpe to auto start on system boot.

# service nrpe start
# chkconfig nrpe on
Step 5. Test NRPE from Nagios Server

Login to nagios server and execute following command to verify that nagios server is able to connect to clients nrpe services. On successful connection it will show version of clients NRPE package.

# check_nrpe -H 192.168.2.23

NRPE v2.14

Reference: http://tecadmin.net/install-nrpe-on-centos-rhel/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值