diff options
Diffstat (limited to 'checks')
-rw-r--r-- | checks/nut | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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) |