Module: check_mk
Branch: master
Commit: 06148959806d62b334392d3a2115fdac229034f7
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=06148959806d62…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Feb 11 16:48:25 2016 +0100
#3054 FIX ups_modulys_battery: Fixed wrong remaining minutes in some cases
---
.bugs/2290 | 7 +++++--
.werks/3054 | 9 +++++++++
ChangeLog | 1 +
checks/ups_modulys_battery | 4 ++--
4 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/.bugs/2290 b/.bugs/2290
index c540e44..2879da8 100644
--- a/.bugs/2290
+++ b/.bugs/2290
@@ -1,11 +1,14 @@
Title: Clarify encoding within Check_MK (core)
Component: core
-State: open
+Class: nastiness
+State: done
Date: 2015-03-10 09:24:00
Targetversion: 1.2.7
-Class: nastiness
We need to deal correctly with encoding within Check_MK. In Multisite we
have a clear situation. Everything is decoded to unicode strings when
reading into Check_MK. When writing out to external programs it's encoded
with UTF-8 again.
+
+2016-02-11 16:39:56: changed state open -> done
+should be clear now.
diff --git a/.werks/3054 b/.werks/3054
new file mode 100644
index 0000000..593244d
--- /dev/null
+++ b/.werks/3054
@@ -0,0 +1,9 @@
+Title: ups_modulys_battery: Fixed wrong remaining minutes in some cases
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i4
+Date: 1455205667
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index eff1840..8b2f8ab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -268,6 +268,7 @@
* 3174 FIX: Fix exception in Check_MK agent version check if version number does not
contain three parts
* 3049 FIX: esx_vsphere_hostsystem.mem_usage_cluster: Fixed exception when no
thresholds configured
* 3052 FIX: domino_mailqueues: Fixed exception when receiving empty data from SNMP
+ * 3054 FIX: ups_modulys_battery: Fixed wrong remaining minutes in some cases
Multisite:
* 2684 Added icons for downloading agent data / walks of hosts...
diff --git a/checks/ups_modulys_battery b/checks/ups_modulys_battery
index 86bc48d..f9f1b21 100644
--- a/checks/ups_modulys_battery
+++ b/checks/ups_modulys_battery
@@ -42,7 +42,7 @@ def check_ups_modulys_battery(item, params, info):
condition, elapsed_sec, capacity = map(lambda x: int(x), (condition, elapsed_sec,
capacity))
if elapsed_sec == 0:
# not on battery so the it will not run out
- remainig_min = sys.maxint
+ remaining_min = sys.maxint
elif not remaining_min:
# The "remaining_min" value isn't always reported and we
don't know why.
# One theory is that it will be reported if on battery but we have no data to
verify.
@@ -50,7 +50,7 @@ def check_ups_modulys_battery(item, params, info):
# If the theory holds true, this branch is never taken. If it doesn't
then its likely
# the information is only available on some variants of the device or in
some
# configurations. We can still report useful data based on
"capacity"
- remainig_min = sys.maxint
+ remaining_min = sys.maxint
else:
remaining_min = int(remaining_min)