[checkmk-commits] Check_MK Git: check_mk: #2013 FIX stulz_pump: Fixed exception during checking for some devices

Lars Michelsen lm at mathias-kettner.de
Fri Feb 20 15:50:16 CET 2015


Module: check_mk
Branch: master
Commit: 86dff54911642973202e61a2abb9002a4dc2d3e0
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=86dff54911642973202e61a2abb9002a4dc2d3e0

Author: Lars Michelsen <lm at mathias-kettner.de>
Date:   Fri Feb 20 15:50:11 2015 +0100

#2013 FIX stulz_pump: Fixed exception during checking for some devices

---

 .werks/2013       |   10 ++++++++++
 ChangeLog         |    1 +
 checks/stulz_pump |    4 ++--
 3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/.werks/2013 b/.werks/2013
new file mode 100644
index 0000000..5506d9f
--- /dev/null
+++ b/.werks/2013
@@ -0,0 +1,10 @@
+Title: stulz_pump: Fixed exception during checking for some devices
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1424443762
+
+
diff --git a/ChangeLog b/ChangeLog
index 79b3e3d..8bb201f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -175,6 +175,7 @@
     * 2006 FIX: services: Add WATO rule for configuring parameters of discovered checks...
     * 2007 FIX: md: Handle rebuild of RAID 5 correctly, handle sitatuation of replacement correctly...
     * 2028 FIX: hyperv_vms: new plugin that allows spaces in VM names...
+    * 2013 FIX: stulz_pump: Fixed exception during checking for some devices
 
     Multisite:
     * 1758 Improved exception hander: Shows details without additional debug request, added mailto link for error report...
diff --git a/checks/stulz_pump b/checks/stulz_pump
index a715af1..86bd808 100644
--- a/checks/stulz_pump
+++ b/checks/stulz_pump
@@ -32,10 +32,10 @@ def inventory_stulz_pump(info):
     return inventory
 
 def check_stulz_pump(item, _no_params, info):
-    for pump_id, pump_status in info[0]:
+    for index, (pump_id, pump_status) in enumerate(info[0]):
         pump_id = pump_id.replace('.1', '')
         if pump_id == item:
-            pump_rpm = info[1][int(pump_id)-1][0]
+            pump_rpm = info[1][index][0]
             perfdata = [ ('rpm', pump_rpm+"%", None, None, 0, 100) ]
             if pump_status == '1':
                 state = 0



More information about the checkmk-commits mailing list