nagios自带的插件check_disk用法

发布时间:2020-07-10 23:59:37 作者:yulei7633
来源:网络 阅读:3215

nagios自带插件check_disk的用法

一、help帮助

check_diskv1.4.15(nagios-plugins1.4.15)

Thisplugincheckstheamountofuseddiskspaceonamountedfilesystem

andgeneratesanalertiffreespaceislessthanoneofthethresholdvalues

Usage:

check_disk-wlimit-climit[-Wlimit][-Klimit]{-ppath|-xdevice}

[-C][-E][-e][-ggroup][-k][-l][-M][-m][-Rpath][-rpath]

[-ttimeout][-uunit][-v][-Xtype]

Options:

-h,--help

Printdetailedhelpscreen

-V,--version

Printversioninformation

-w,--warning=INTEGER

ExitwithWARNINGstatusiflessthanINTEGERunitsofdiskarefree

-w,--warning=PERCENT%

ExitwithWARNINGstatusiflessthanPERCENTofdiskspaceisfree

-c,--critical=INTEGER

ExitwithCRITICALstatusiflessthanINTEGERunitsofdiskarefree

-c,--critical=PERCENT%

ExitwithCRITCALstatusiflessthanPERCENTofdiskspaceisfree

-W,--iwarning=PERCENT%

ExitwithWARNINGstatusiflessthanPERCENTofinodespaceisfree

-K,--icritical=PERCENT%

ExitwithCRITICALstatusiflessthanPERCENTofinodespaceisfree

-p,--path=PATH,--partition=PARTITION

Pathorpartition(mayberepeated)

-x,--exclude_device=PATH<STRING>

Ignoredevice(onlyworksif-punspecified)

-C,--clear

Clearthresholds

-E,--exact-match

Forpathsorpartitionsspecifiedwith-p,onlycheckforexactpaths

-e,--errors-only

Displayonlydevices/mountpointswitherrors

-g,--group=NAME

Grouppaths.Thresholdsapplyto(free-)spaceofallpartitionstogether

-k,--kilobytes

Sameas'--unitskB'

-l,--local

Onlychecklocalfilesystems

-L,--stat-remote-fs

Onlychecklocalfilesystemsagainstthresholds.Yetcallstatonremotefilesystems

totestiftheyareaccessible(e.g.todetectStaleNFSHandles)

-M,--mountpoint

Displaythemountpointinsteadofthepartition

-m,--megabytes

Sameas'--unitsMB'

-A,--all

Explicitlyselectallpaths.Thisisequivalentto-R'.*'

-R,--eregi-path=PATH,--eregi-partition=PARTITION

Caseinsensitiveregularexpressionforpath/partition(mayberepeated)

-r,--ereg-path=PATH,--ereg-partition=PARTITION

Regularexpressionforpathorpartition(mayberepeated)

-I,--ignore-eregi-path=PATH,--ignore-eregi-partition=PARTITION

Regularexpressiontoignoreselectedpath/partition(caseinsensitive)(mayberepeated)

-i,--ignore-ereg-path=PATH,--ignore-ereg-partition=PARTITION

Regularexpressiontoignoreselectedpathorpartition(mayberepeated)

-t,--timeout=INTEGER

Secondsbeforeconnectiontimesout(default:10)

-u,--units=STRING

Choosebytes,kB,MB,GB,TB(default:MB)

-v,--verbose

Showdetailsforcommand-linedebugging(Nagiosmaytruncateoutput)

-X,--exclude-type=TYPE

Ignoreallfilesystemsofindicatedtype(mayberepeated)

二、举例:

./check_disk-w80%-c10%-p/

解释:

1-w:设置警告阀值:如果空闲空间小于80%就是警告阀值

2-c:设置critial阀值:如果空闲空间小于10%就是critial阀值

3-p:指定监控的partition分区

推荐阅读:
  1. nagios check_disk:DISK CRITICAL - /root/.gvfs is not accessible: Permission denied
  2. 如何编写nagios插件--示例

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

nagios插件 check_disk

上一篇:JQuery 级联(ul仿select级联)

下一篇:request.getRequestDispatcher("login.html");页面乱码

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》