免费注册 查看新帖 |

Chinaunix

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

[其他] nagios监控的服务状态为什么是CRITICAL [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2014-12-09 17:31 |只看该作者 |倒序浏览
自己在虚拟机上配置nagios,添加了2个服务,check_load及check_disk_sda2,为什么状态显示为CRITICAL?


日志:/var/log/nagios/nagios.log

[1418116195] SERVICE ALERT: 192.168.12.120;check_load;CRITICAL;HARD;5;(Return code of 255 is out of bounds)
[1418116195] SERVICE NOTIFICATION: nagiosadmin;192.168.12.120;check_load;CRITICAL;notify-service-by-email;(Return code of 255 is out of bounds)
[1418116255] Warning: Return code of 255 for check of service 'check_disk_sda2' on host '192.168.12.120' was out of bounds.
[1418116255] Warning: Return code of 255 for check of service 'check_load' on host '192.168.12.120' was out of bounds.
[1418116315] Warning: Return code of 255 for check of service 'check_disk_sda2' on host '192.168.12.120' was out of bounds.
[1418116315] Warning: Return code of 255 for check of service 'check_load' on host '192.168.12.120' was out of bounds.
[1418116375] Warning: Return code of 255 for check of service 'check_disk_sda2' on host '192.168.12.120' was out of bounds.
[1418116375] Warning: Return code of 255 for check of service 'check_load' on host '192.168.12.120' was out of bounds.
[1418116435] Warning: Return code of 255 for check of service 'check_disk_sda2' on host '192.168.12.120' was out of bounds.
[1418116435] Warning: Return code of 255 for check of service 'check_load' on host '192.168.12.120' was out of bounds.
[1418116495] Warning: Return code of 255 for check of service 'check_disk_sda2' on host '192.168.12.120' was out of bounds.
[1418116495] Warning: Return code of 255 for check of service 'check_load' on host '192.168.12.120' was out of bounds.

添加的配置:/etc/nagios/conf.d/192.168.12.120.cfg
define host{
        use                     linux-server
        host_name               192.168.12.120
        alias                   120
        address                 192.168.12.120
        }


define service{
        use                     generic-service
        host_name               192.168.12.120
        service_description     check_http
        check_command           check_http
        max_check_attempts      5
        normal_check_interval 1
}


define service{
        use     generic-service
        host_name       192.168.12.120
        service_description     check_load
        check_command           check_nrpe!check_load
        max_check_attempts 5
        normal_check_interval 1
}


define service{
        use     generic-service
        host_name       192.168.12.120
        service_description     check_disk_sda2
        check_command           check_nrpe!check_sda2
        max_check_attempts 5
        normal_check_interval 1
}

求解答。谢谢!

论坛徽章:
0
2 [报告]
发表于 2014-12-09 19:38 |只看该作者
现在Ok,是我这边网络问题


   
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP