Module: check_mk
Branch: master
Commit: 07457cf7dcc263f3b695c80a5fe14d50da0064fd
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=07457cf7dcc263…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sun Feb 27 11:37:26 2011 +0100
FIX: repaired broken apc_symmetra
Was broken due to new -Ot
---
ChangeLog | 2 ++
checks/apc_symmetra | 6 ++----
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b75e0be..9ba9f10 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,8 @@
(needs agent update)
* FIX: repaired df_netapp32
* Added SNMP scan function of df_netapp and df_netapp32
+ * FIX: repaired apc_symmetra (was broken due to new option -Ot
+ for SNMP)
1.1.9i9:
diff --git a/checks/apc_symmetra b/checks/apc_symmetra
index f64d443..bec7bf9 100644
--- a/checks/apc_symmetra
+++ b/checks/apc_symmetra
@@ -112,10 +112,8 @@ def check_apc(item, params, info):
# 8. run time remaining
# RunTimeRemaining == "0:0:26:00.00"
- parts = RunTimeRemaining.split(":")
- secs = int(float(parts[-1]))
- mins = int(parts[-2])
- hrs = int(parts[-3])
+ hrs = int(RunTimeRemaining) / 3600
+ mins, secs = divmod(int(RunTimeRemaining) % 3600, 60)
single_states.append( (0, "run time remaining: %02d:%02d:%02d" % (hrs,
mins, secs), None) )
# create summary state