[checkmk-commits] Check_MK Git: check_mk: #2018 FIX ibm_imm_health: Fixed exception when host does provides empty SNMP data

Lars Michelsen lm at mathias-kettner.de
Wed Feb 25 15:33:45 CET 2015


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

Author: Lars Michelsen <lm at mathias-kettner.de>
Date:   Wed Feb 25 15:33:19 2015 +0100

#2018 FIX ibm_imm_health: Fixed exception when host does provides empty SNMP data

---

 .werks/2018           |    9 +++++++++
 ChangeLog             |    1 +
 checks/ibm_imm_health |   12 ++++--------
 3 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/.werks/2018 b/.werks/2018
new file mode 100644
index 0000000..79aae76
--- /dev/null
+++ b/.werks/2018
@@ -0,0 +1,9 @@
+Title: ibm_imm_health: Fixed exception when host does provides empty SNMP data
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i1
+Date: 1424874548
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 53b1d87..aab5204 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -191,6 +191,7 @@
     * 2034 FIX: netapp_api_volumes: added Perf-O-Meter
     * 2035 FIX: check_mk-netapp_api_if, check_mk-if_brocade: added missing Perf-O-Meters
     * 2017 FIX: Solaris-Agent: Prevent hanging agent in uptime section...
+    * 2018 FIX: ibm_imm_health: Fixed exception when host does provides empty SNMP data
 
     Multisite:
     * 1758 Improved exception hander: Shows details without additional debug request, added mailto link for error report...
diff --git a/checks/ibm_imm_health b/checks/ibm_imm_health
index 82a901a..35e5c93 100644
--- a/checks/ibm_imm_health
+++ b/checks/ibm_imm_health
@@ -24,18 +24,14 @@
 # to the Free Software Foundation, Inc., 51 Franklin St,  Fifth Floor,
 # Boston, MA 02110-1301 USA.
 
-def ibm_imm_health_scan(oid):
-    if oid('.1.3.6.1.2.1.1.1.0').lower().endswith(" mips") or \
-       oid('.1.3.6.1.2.1.1.1.0').lower().endswith(" sh4a"):
-        return True
-    else:
-        return False
-
 def inventory_ibm_imm_health(info):
-    if len(info) > 0:
+    if info:
         return [(None, None)]
 
 def check_ibm_imm_health(_no_item, _no_params, info):
+    if not info:
+        return 3, 'Health info not found in SNMP data'
+
     num_alerts = (len(info) - 1) / 3
     infotext = ""
     for i in range(0, num_alerts):



More information about the checkmk-commits mailing list