Module: check_mk
Branch: master
Commit: 9641bb4346df6a341f15570b778b01e91ee11348
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9641bb4346df6a…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Dec 31 14:50:54 2013 +0100
FIX Fix exception in case of missing agent sections of cluster-aware checks
If you configure (by mistake) an <tt>ps</tt> check on an SNMP device - which
obviously does not have that agent information - Check_MK would crash with
an exception. This has been fixed.
---
.werks/402 | 12 ++++++++++++
ChangeLog | 1 +
modules/check_mk_base.py | 2 +-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/402 b/.werks/402
new file mode 100644
index 0000000..b6fe3f4
--- /dev/null
+++ b/.werks/402
@@ -0,0 +1,12 @@
+Title: Fix exception in case of missing agent sections of cluster-aware checks
+Level: 1
+Component: core
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1388497781
+Targetversion: future
+
+If you configure (by mistake) an <tt>ps</tt> check on an SNMP device - which
+obviously does not have that agent information - Check_MK would crash with
+an exception. This has been fixed.
diff --git a/ChangeLog b/ChangeLog
index bea7e32..cb41fac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@
* 0354 FIX: Catch exception when check plugins do not return a state...
* 0398 FIX: Tolerate debug output in check plugins when using CMC...
* 0401 FIX: Fix rule precedence in WATO-configured manual checks...
+ * 0402 FIX: Fix exception in case of missing agent sections of cluster-aware
checks...
Checks & Agents:
* 0306 esx_vsphere_counters: added missing ramdisk levels sfcbtickets
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index bab5a00..2c8f358 100644
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -306,7 +306,7 @@ def get_host_info(hostname, ipaddress, checkname):
return info
else:
info = get_realhost_info(hostname, ipaddress, checkname,
check_max_cachefile_age)
- if add_nodeinfo:
+ if info != None and add_nodeinfo:
return [ [ None ] + line for line in info ]
else:
return info