nagios自带插件check_swap的用法
一、help帮助
check_swapv1.4.15(nagios-plugins1.4.15)
Usage:
check_swap[-av]-w<percent_free>%-c<percent_free>%
check_swap[-av]-w<bytes_free>-c<bytes_free>
Options:
-h,--help
Printdetailedhelpscreen
-V,--version
Printversioninformation
-w,--warning=INTEGER
ExitwithWARNINGstatusiflessthanINTEGERbytesofswapspacearefree
-w,--warning=PERCENT%%
ExitwithWARNINGstatusiflessthanPERCENTofswapspaceisfree
-c,--critical=INTEGER
ExitwithCRITICALstatusiflessthanINTEGERbytesofswapspacearefree
-c,--critical=PERCENT%%
ExitwithCRITCALstatusiflessthanPERCENTofswapspaceisfree
-a,--allswaps
Conductcomparisonsforallswappartitions,onebyone
-v,--verbose
Showdetailsforcommand-linedebugging(Nagiosmaytruncateoutput)
二、举例:
./check_swap-w50%-c20%
解释:
1、-w:设置警告阀值,如果剩余的swap不足50%,启动警告阀值
2、-c:设置critial阀值,如果剩余的swap不足20%,启动critial阀值