Module: check_mk
Branch: master
Commit: dce4736af3e9c429ea52c88f7dcd212b689f120d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=dce4736af3e9c4…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Aug 28 13:31:08 2017 +0200
4857 FIX esx_vsphere_vm.datastores: this check always reported only one datastore
information
This check now reports all datastores information for this VM.
Change-Id: Iaf63289a53159ed0c49c6e7e1814e0304a15a0cb
---
.werks/4857 | 12 ++++++++++++
agents/special/agent_vsphere | 2 +-
checks/esx_vsphere_vm | 2 +-
3 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/.werks/4857 b/.werks/4857
new file mode 100644
index 0000000..be44139
--- /dev/null
+++ b/.werks/4857
@@ -0,0 +1,12 @@
+Title: esx_vsphere_vm.datastores: this check always reported only one datastore
information
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1503919723
+
+This check now reports all datastores information for this VM.
+
diff --git a/agents/special/agent_vsphere b/agents/special/agent_vsphere
index 2916b4a..8bfdc88 100755
--- a/agents/special/agent_vsphere
+++ b/agents/special/agent_vsphere
@@ -1571,7 +1571,7 @@ if not error:
else:
# No matching datastore was found. At least add the name
response.append("name %s" % name)
- return "\t".join(response)
+ return "@@".join(response)
transform_functions = {
"snapshot.rootSnapshotList" : eval_snapshot_list,
diff --git a/checks/esx_vsphere_vm b/checks/esx_vsphere_vm
index 128a637..d5492b5 100644
--- a/checks/esx_vsphere_vm
+++ b/checks/esx_vsphere_vm
@@ -183,7 +183,7 @@ def check_esx_vsphere_vm_datastores(no_item, no_params, info):
return 3, "Datastore information is missing"
output = []
- for datastore_url in " ".join(datastore_urls).split("\t"):
+ for datastore_url in " ".join(datastore_urls).split("@@"):
datastore_url = datastore_url.split("|")
output_store = []