免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4044 | 回复: 3
打印 上一主题 下一主题

nagios 使用snmp监控出错 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-11-10 09:34 |只看该作者 |倒序浏览
各位好,我在centos 5.6上建了个nagios-3.2.1,另外安装了nagios-snmp-plugins.1.1.1来监控服务器。
    现在碰到的问题是,直接使用命令执行时能正常返回结果,但是使用nagios时就报错,详细信息
如下:
    1、在命令行执行正常:
    [root@bogon libexec]# ./check_snmp_storage.pl -H 10.38.202.202 -C public    -m "^C" -w 90 -c 95 -t 60
    C:\ Label:Systen  Serial Number b0534333: 79%used(19738MB/25000MB) (<90%) : OK

    2、但是使用nagios时报错:
    a. command.cfg 文件配置:
    # 'check_snmp_stor" command definition
    define command{
        command_name    check_snmp_stor
    #        command_line    $USER1$/check_snmp_storage.pl -H $HOSTADDRESS$ -C $ARG1$ -m $ARG2$ -w $ARG3$ -c $ARG4$
        command_line    /usr/local/nagios/libexec/check_snmp_storage.pl -H $HOSTADDRESS$ -C $ARG1$ -m $ARG2$ -w $ARG3$ -c $ARG4$
        }
    b. 服务文件配置:
    define service{
        use                     generic-service
        host_name               ISS1103000SS
        service_description     check_snmp_stor
        check_command           check_snmp_stor!webserver!public!C!90!95
    #       check_command           check_snmp_stor!webserver!public!"^C"!90!95
        }
    c. nagios 页面报错如下:
    Status Information:        ERROR: Description/Type table : No response from remote host "192.168.1.251“

    不知这个问题有没有哪位知道,还望指教。十分感谢!~

论坛徽章:
0
2 [报告]
发表于 2011-11-10 16:54 |只看该作者
请各位帮帮忙。感激不尽!

论坛徽章:
0
3 [报告]
发表于 2011-11-11 12:25 |只看该作者
你这个主机192.168.1.251地址定义了没?
类似如下:
define host{
        use                     oracle-db            ; Name of host template to use ; This host definition will inherit all variables that are defined; in (or inherited by) the linux-server host template definition.
        host_name               192.9.70.1-xx
        alias                        xx-192.9.70.1
        address                   192.9.70.1
        }

论坛徽章:
0
4 [报告]
发表于 2011-11-14 16:30 |只看该作者
把check_command           check_snmp_stor!webserver!public!C!90!95
修改为:
check_command           check_snmp_stor!public!C!90!95
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP