Nagios的功能、插件
Nagios監(jiān)控
相關(guān)內(nèi)容
1).nagios目錄功能的簡要說明
2)如何使用nagios插件
可以看到有很多插件我們也可以使用幫助來自己寫監(jiān)控代碼
[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]
#監(jiān)控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調(diào)用cpuload,5分鐘內(nèi)負(fù)載平均達(dá)到80%為warning,負(fù)載達(dá)到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.
#如果要監(jiān)控C盤,達(dá)到80%報警,達(dá)到90%為嚴(yán)重危險
check_nt!USEDDISKSPACE!-l c -w 80 -c 90
|
nagios文件關(guān)系圖

【編輯推薦】