nagios可以基本监控前提下的排错

在配置过程中遇到以下错误:

1,NRPE: Command 'check_http' not defined
2,NRPE: Command 'check_ssh' not defined
3,NRPE: Command 'check_ping' not defined
4,NRPE: Command 'check_disk' not defined
5,NRPE: Command 'check_swap' not defined
6,NRPE: Command 'check_procs' not defined

解决方法:

就是/etc/nagios/nrpe.cfg里面添加相应的command[]配置,例如解决check_http not defined只要加一个command[check_http]就行了。

以下是我在命令行下的测试,只要命令行下OK了,nagios的web监控就不会报错了。




    [root@localhost objects]# /usr/lib64/nagios/plugins/check_nrpe -H 192.168.1.120 -c check_http  
    OK - load average: 1.04, 0.31, 0.10|load1=1.040;15.000;30.000;0; load5=0.310;10.000;25.000;0; load15=0.100;5.000;20.000;0;   
      
    [root@localhost ~]# /usr/lib64/nagios/plugins/check_nrpe -H 192.168.1.120 -c check_ping  
    PING OK - Packet loss = 0%, RTA = 0.04 ms|rta=0.035000ms;3000.000000;5000.000000;0.000000 pl=0%;80;100;0  
      
    [root@localhost ~]# /usr/lib64/nagios/plugins/check_nrpe -H 192.168.1.120 -c check_disk  
    DISK OK - free space: / 41756 MB (87% inode=96%);| /=6080MB;40316;45356;0;50396  
      
    [root@localhost ~]# /usr/lib64/nagios/plugins/check_nrpe -H 192.168.1.120 -c check_ssh  
    SSH OK - OpenSSH_5.3 (protocol 2.0)  
      
    [root@localhost ~]# /usr/lib64/nagios/plugins/check_nrpe -H 192.168.1.120 -c check_swap  
    SWAP OK - 100% free (10047 MB out of 10047 MB) |swap=10047MB;3014;1004;0;10047  
      
    [root@localhost ~]# /usr/lib64/nagios/plugins/check_nrpe -H 192.168.1.120 -c check_procs  
    PROCS CRITICAL: 285 processes  




客户端配置很简单,重起一下/etc/init.d/nrpe reload

如果使用了iptables等类似防火墙的话,开一个端口5666,你可以通过netstat来查看端口情况。或者是配置文件。

nagios监控多台服务器

nagios监控多台服务器

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值