nagios监控提示null
2010年8月2日
2 条评论
今天在nagios插件网上下载了一个check_uptime.pl 插件,来监测nginx服务器的运行天数,服务器的运行时间·下载下来在服务器上执行能得到数据,但是在nagios服务器上,在commands.cfg 加了配置文件,然后在services.cfg 加了监测服务,在nagios 页面上显示 null. 在网上查找了好久原因都没找到问题的所在,想好了久,既然执行命令能输出内容,为什么在nagios上不能输出内容呢,发现是这个插件的输出内容格式与 nagios 的内容格式不符所导致的。
报警信息为:
***** Nagios *****
Notification Type: PROBLEM
Service: fms_uptime1
Host: fms-server
Address: 219.232.237.166
State: CRITICAL
Date/Time: Mon Aug 2 13:39:17 CST 2010
Additional Info:
(null)
下载的 check_uptime.pl 输出内容:
nagios $> ./check_uptime.pl -H -L
OK :UPTIME on fms – current uptime: 23 days
正确格式应该为:
OK – UPTIME on fms – current uptime: 23 days
状态 后面要跟 – 不能为冒号 :
近期评论