nagios客户端nrpe的安装

安装nrpe的过程:

  
安装nrpe客户端:  [root@svr1 ~]# useradd nagios    [root@svr1 ~]# tar -xzf nagios-plugins-1.4.15.tar.gz   [root@svr1 ~]# cd nagios-plugins-1.4.15  [root@svr1 nagios-plugins-1.4.15]# ./configure   [root@svr1 nagios-plugins-1.4.15]# make && make install     [root@svr1 ~]# tar -xzf nrpe-2.12.tar.gz   [root@svr1 ~]# cd nrpe-2.12  [root@svr1 nrpe-2.12]# ./configure  *** Configuration summary for nrpe 2.12 03-10-2008 ***:     General Options:   -------------------------   NRPE port:    5666   NRPE user:    nagios   NRPE group:   nagios   Nagios user:  nagios   Nagios group: nagios    [root@svr1 nrpe-2.12]# make all && make install-plugin  cd ./src/ && make install-plugin  make[1]: Entering directory `/root/nrpe-2.12/src'  /usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/libexec  /usr/bin/install -c -m 775 -o nagios -g nagios check_nrpe /usr/local/nagios/libexec  make[1]: Leaving directory `/root/nrpe-2.12/src'  [root@svr1 nrpe-2.12]# make install-daemon  cd ./src/ && make install-daemon  make[1]: Entering directory `/root/nrpe-2.12/src'  /usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/bin  /usr/bin/install -c -m 775 -o nagios -g nagios nrpe /usr/local/nagios/bin  make[1]: Leaving directory `/root/nrpe-2.12/src'  [root@svr1 nrpe-2.12]# make install-daemon-config  /usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/etc  /usr/bin/install -c -m 644 -o nagios -g nagios sample-config/nrpe.cfg /usr/local/nagios/etc  [root@svr1 nrpe-2.12]# make install-xinetd  /usr/bin/install -c -m 644 sample-config/nrpe.xinetd /etc/xinetd.d/nrpe     [root@svr1 nrpe-2.12]# vim /etc/xinetd.d/nrpe   # default: on  # description: NRPE (Nagios Remote Plugin Executor)  service nrpe  {          flags           = REUSE          socket_type     = stream          port            = 5666          wait            = no          user            = nagios          group           = nagios          server          = /usr/local/nagios/bin/nrpe          server_args     = -c /usr/local/nagios/etc/nrpe.cfg --inetd          log_on_failure  += USERID          disable         = no          only_from       = 10.1.1.40  }    [root@svr1 nrpe-2.12]# service xinetd restart  Stopping xinetd: [  OK  ]  Starting xinetd: [  OK  ]  [root@svr1 nrpe-2.12]# chkconfig --list | grep nrpe          nrpe:           on  [root@svr1 nrpe-2.12]# netstat -tnlp | grep nrpe  tcp        0      0 0.0.0.0:5666                0.0.0.0:*                   LISTEN      25360/nrpe        [root@svr1 nrpe-2.12]# vim /usr/local/nagios/etc/nrpe.cfg    修一行:  allowed_hosts=127.0.0.1,10.1.1.40    本机测试!  [root@svr1 nrpe-2.12]# /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d  [root@svr1 nrpe-2.12]# /usr/local/nagios/libexec/check_nrpe -H localhost -c check_load  OK - load average: 0.00, 0.00, 0.00|load1=0.000;15.000;30.000;0; load5=0.000;10.000;25.000;0;     load15=0.000;5.000;20.000;0;     备注:有时候在客户端本机上测试时,发现会报错。CHECK_NRPE: Error - Could not complete SSL handshake.  这个时候,注意下xinetd.d/nrpe 以及nrpe.conf 里关于allowed相关的选项,另外就是防火墙。  使用xinetd后发现重启xinetd并不能重启nrpe,只有将其 T掉然后再开。    从远程主机上测试下:  [root@svr4 ~]# /usr/local/nagios/libexec/check_nrpe -H 10.1.1.10 -c check_total_procs  PROCS CRITICAL: 249 processes    监控一下客户机的81,82服务吧!详见下篇 

本文出自 “潜入技术的海洋” 博客,请务必保留此出处http://myhat.blog.51cto.com/391263/653363

转载于:https://my.oschina.net/u/2316994/blog/376920

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值