change numbers
This commit is contained in:
parent
d41d3a5313
commit
d4b71f6097
@ -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