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