Nagios监控
相关内容
1).nagios目录功能的简要说明
2)如何使用nagios插件
可以看到有很多插件我们也可以使用帮助来自己写监控代码
[root@cxy libexec]# pwd
/usr/local/nagios/libexec
[root@cxy libexec]# ./check_nt -h
Usage:check_nt -H host -v variable [-p port] [-w warning] [-c critical][-l params] [-d SHOWALL] [-t timeout]
#监控CPU写法
CPULOAD =
Average CPU load on last x minutes.
Request a -l parameter with the following syntax:
-l <minutes range>,<warning threshold>,<critical threshold>.
<minute range> should be less than 24*60.
Thresholds are percentage and up to 10 requests can be done in one shot.
ie: -l 60,90,95,120,90,95
#完整写法为
check_nt!CPULOAD!-l 5,80,90
check_nt调用cpuload,5分钟内负载平均达到80%为warning,负载达到90%为critical
|
USEDDISKSPACE =
Size and percentage of disk use.
Request a -l parameter containing the drive letter only.
Warning and critical thresholds can be specified with -w and -c.
#如果要监控C盘,达到80%报警,达到90%为严重危险
check_nt!USEDDISKSPACE!-l c -w 80 -c 90
|
nagios文件关系图
【编辑推荐】