Module: check_mk
Branch: master
Commit: ff7c2dc8bb9b8fcfa5378a8750ff773d93290ed1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ff7c2dc8bb9b8f…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Apr 25 14:16:30 2016 +0200
3523 FIX esx_vsphere_hostsystem: fixed exception when no multipath state info is
available
---
.werks/3523 | 9 +++++++++
ChangeLog | 2 +-
checks/esx_vsphere_hostsystem | 7 +++++--
3 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/.werks/3523 b/.werks/3523
new file mode 100644
index 0000000..6a65280
--- /dev/null
+++ b/.werks/3523
@@ -0,0 +1,9 @@
+Title: esx_vsphere_hostsystem: fixed exception when no multipath state info is available
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.9i1
+Date: 1461586573
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 04c6189..568f2bd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -181,7 +181,7 @@
* 3421 FIX: cisco_asa_failover: Do not discover interfaces where failover is not
enabled...
* 3422 FIX: printer_pages, canon_pages: Detect pages on Canon 8350 with generic
check...
* 3463 FIX: ups_modulys_alarms: avoid crash on some SOCOMEC UPS where some alarm OIDs
are empty
- * 3464 FIX: netstat.linux: fix monitoring of UDP listeners...
+ * 3523 FIX: esx_vsphere_hostsystem: fixed exception when no multipath state info is
available
Multisite:
* 3187 notification view: new filter for log command via regex
diff --git a/checks/esx_vsphere_hostsystem b/checks/esx_vsphere_hostsystem
index 284f443..11fbf4a 100644
--- a/checks/esx_vsphere_hostsystem
+++ b/checks/esx_vsphere_hostsystem
@@ -373,9 +373,12 @@ check_info['esx_vsphere_hostsystem.maintenance'] = {
def esx_vsphere_multipath_convert(info):
data = esx_vsphere_hostsystem_convert(info)
- data = data['config.multipathState.path']
- data = zip(data[::2], data[1::2])
paths = {}
+ data = data.get('config.multipathState.path')
+ if not data:
+ return paths
+
+ data = zip(data[::2], data[1::2])
for path, state in data:
# ESX 6.0 uses a different format, e.g "vmhba32:C0:T0:L0 active"
if len(path.split(":")) == 4: