Compare commits

...

2 Commits

Author SHA1 Message Date
Simon Zeyer
7d3568841e update readme 2021-12-11 15:51:41 +01:00
Simon Zeyer
d4b71f6097 change numbers 2021-12-11 15:50:01 +01:00
2 changed files with 8 additions and 8 deletions

View File

@ -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 checks/* -> /local/share/check_mk/checks on checkmk site

View File

@ -35,17 +35,17 @@ def check_nc_groupquota(item, params, info):
return return
perfdata = [ 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 #check counter
if 100*int(group[2])/int(group[1]) >= params["levels"][1]: if 100*int(group[2])/int(group[1]) >= params[1]:
yield 2, "quota using {} exceeted crit level of {}%".format(100*int(group[2])/int(group[1]), params["levels"][1]), perfdata yield 2, "quota using {} exceeted crit level of {}%".format(int(100*int(group[2])/int(group[1])), params[1]), perfdata
return return
if 100*int(group[2])/int(group[1]) >= params["levels"][0]: if 100*int(group[2])/int(group[1]) >= params[0]:
yield 1, "quota using {} exceeted warn level of {}%".format(100*int(group[2])/int(group[1]), params["levels"][0]), perfdata yield 1, "quota using {} exceeted warn level of {}%".format(int(100*int(group[2])/int(group[1])), params[0]), perfdata
return return
if 100*int(group[2])/int(group[1]) < params["levels"][0]: if 100*int(group[2])/int(group[1]) < params[0]:
yield 0, "quota using {}%".format(100*int(group[2])/int(group[1])), perfdata yield 0, "quota using {}%".format(int(100*int(group[2])/int(group[1]))), perfdata
return return
yield 3, "error occured in check plugin." yield 3, "error occured in check plugin."