summaryrefslogtreecommitdiff
path: root/checks/nut
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2015-09-09 20:19:35 (GMT)
committerChristian Pointner <equinox@helsinki.at>2015-09-09 20:19:35 (GMT)
commit8b471ee3e166b41ff609604ea332de62b867e235 (patch)
tree03c8c41d9eb465e3c40b344e477c3da765bdba40 /checks/nut
parente2b336a282671e7dd058f04a497a16a490bf0645 (diff)
fixed nut runtime check
Diffstat (limited to 'checks/nut')
-rw-r--r--checks/nut7
1 files changed, 4 insertions, 3 deletions
diff --git a/checks/nut b/checks/nut
index c269d3c..f5ec1cc 100644
--- a/checks/nut
+++ b/checks/nut
@@ -47,7 +47,7 @@ nut_output_default_values = (245, 250)
nut_battery_default_levels = (10, 5)
nut_battery_charge_default_levels = (90, 85)
-nut_battery_runtime_default_levels = (1200, 900)
+nut_battery_runtime_default_levels = (900, 600)
nut_input_voltage_fault_default_levels = (155, 160)
nut_input_default_levels = (245, 250)
@@ -147,12 +147,13 @@ def check_nut_battery_runtime(item, params, info):
if len(line) >= 3 and line[0] == item and line[1] == "battery.runtime:":
+ runtime_s = int(line[2])
runtime = float(line[2]) / 60
perfdata = [ ( "runtime", runtime, warn, crit ) ]
- if runtime <= crit:
+ if runtime_s <= crit:
return (2, "CRIT - Battery Runtime is %0.2f min" % runtime, perfdata)
- elif runtime <= warn:
+ elif runtime_s <= warn:
return (1, "WARN - Battery Runtime is %0.2f min" % runtime, perfdata)
else:
return (0, "OK - Battery Runtime is %0.2f min" % runtime, perfdata)