Compare commits
2 Commits
d41d3a5313
...
7d3568841e
Author | SHA1 | Date | |
---|---|---|---|
|
7d3568841e | ||
|
d4b71f6097 |
@ -1,2 +1,2 @@
|
||||
plugins/* -> /usr/lib/check_mk_agent/plugins
|
||||
plugins/* -> /usr/lib/check_mk_agent/plugins (update paths to occ, keys should not contain keys)
|
||||
checks/* -> /local/share/check_mk/checks on checkmk site
|
@ -35,17 +35,17 @@ def check_nc_groupquota(item, params, info):
|
||||
return
|
||||
|
||||
perfdata = [
|
||||
( "quota", int(group[2]), int(group[1])/100*params["levels"][0], int(group[1])/100*params["levels"][1] ),
|
||||
( "quota", int(group[2])/1024/1024, int(group[1])/1024/1024/100*params[0], int(group[1])/1024/1024/100*params[1] ),
|
||||
]
|
||||
#check counter
|
||||
if 100*int(group[2])/int(group[1]) >= params["levels"][1]:
|
||||
yield 2, "quota using {} exceeted crit level of {}%".format(100*int(group[2])/int(group[1]), params["levels"][1]), perfdata
|
||||
if 100*int(group[2])/int(group[1]) >= params[1]:
|
||||
yield 2, "quota using {} exceeted crit level of {}%".format(int(100*int(group[2])/int(group[1])), params[1]), perfdata
|
||||
return
|
||||
if 100*int(group[2])/int(group[1]) >= params["levels"][0]:
|
||||
yield 1, "quota using {} exceeted warn level of {}%".format(100*int(group[2])/int(group[1]), params["levels"][0]), perfdata
|
||||
if 100*int(group[2])/int(group[1]) >= params[0]:
|
||||
yield 1, "quota using {} exceeted warn level of {}%".format(int(100*int(group[2])/int(group[1])), params[0]), perfdata
|
||||
return
|
||||
if 100*int(group[2])/int(group[1]) < params["levels"][0]:
|
||||
yield 0, "quota using {}%".format(100*int(group[2])/int(group[1])), perfdata
|
||||
if 100*int(group[2])/int(group[1]) < params[0]:
|
||||
yield 0, "quota using {}%".format(int(100*int(group[2])/int(group[1]))), perfdata
|
||||
return
|
||||
|
||||
yield 3, "error occured in check plugin."
|
||||
|
Loading…
x
Reference in New Issue
Block a user