Module: check_mk
Branch: master
Commit: 984c8b9ca92cf43f87ba1d84eb5b6536c2540f0c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=984c8b9ca92cf4…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jan 26 14:25:42 2016 +0100
#2963 FIX esx_vsphere_datastores: Deal with empty url attribute of datastores
---
.werks/2963 | 9 +++++++++
ChangeLog | 1 +
checks/esx_vsphere_datastores | 8 +++++++-
3 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/.werks/2963 b/.werks/2963
new file mode 100644
index 0000000..b478ab7
--- /dev/null
+++ b/.werks/2963
@@ -0,0 +1,9 @@
+Title: esx_vsphere_datastores: Deal with empty url attribute of datastores
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i4
+Date: 1453814735
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index e252129..8cb7aec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -222,6 +222,7 @@
* 2960 FIX: tsm_stagingpools: Fixed exception in case of garbled agent output
* 2961 FIX: tsm_sessions: Fixed crash in cae of client name contains spaces
* 2962 FIX: esx_vsphere_vm.guest_tools: Fixed exception in case no version info is
available
+ * 2963 FIX: esx_vsphere_datastores: Deal with empty url attribute of datastores
Multisite:
* 2684 Added icons for downloading agent data / walks of hosts...
diff --git a/checks/esx_vsphere_datastores b/checks/esx_vsphere_datastores
index 0aba3e3..ad7b112 100644
--- a/checks/esx_vsphere_datastores
+++ b/checks/esx_vsphere_datastores
@@ -42,7 +42,13 @@ def esx_vsphere_datastores_parse(info):
store = {}
stores[name] = store
else:
- key, value = line
+ # Seems that the url attribute can have an empty value
+ if len(line) == 1:
+ key = line[0].strip()
+ value = None
+ else:
+ key, value = line
+
if key == "accessible":
value = value.lower() == "true"
elif key in [ "capacity", "freeSpace",
"uncommitted" ]: