Module: check_mk
Branch: master
Commit: 9388d20b48330246329f15262af19ff8c6dcb19a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9388d20b483302…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Dec 9 17:57:40 2013 +0100
FIX Virtualmachine names with space no longer have missing piggyback data
Every space character in a virtualmachines name needs to be converted to an underline
character.
This didn't apply to the piggyback data section for the VM.
---
.werks/240 | 9 +++++++++
ChangeLog | 1 +
agents/special/agent_vsphere | 4 ++--
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/.werks/240 b/.werks/240
new file mode 100644
index 0000000..791d410
--- /dev/null
+++ b/.werks/240
@@ -0,0 +1,9 @@
+Title: Virtualmachine names with space no longer have missing piggyback data
+Level: 1
+Component: checks
+Version: 1.2.3i8
+Date: 1386608073
+Class: fix
+
+Every space character in a virtualmachines name needs to be converted to an underline
character.
+This didn't apply to the piggyback data section for the VM.
diff --git a/ChangeLog b/ChangeLog
index 4072a85..171b102 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@
* 0300 FIX: cisco_fru_power: Trying not to inventorize not plugged in FRUs...
* 0305 FIX: apache_status: Fixed exception when agent reports HTML code as
apache-status data...
* 0104 FIX: mssql: Server instances with underline in name are now supported....
+ * 0240 FIX: Virtualmachine names with space no longer have missing piggyback data...
Multisite:
* 0302 FIX: Fixed highlight of choosen elements in foldertee/views snapin in
Chrome/IE
diff --git a/agents/special/agent_vsphere b/agents/special/agent_vsphere
index 94a4f44..452296c 100755
--- a/agents/special/agent_vsphere
+++ b/agents/special/agent_vsphere
@@ -557,7 +557,7 @@ if not error:
for key in sorted(vms.keys()):
data = vms[key]
if data.get("name"):
- print "<<<<%s>>>>" %
data.get("name")
+ print "<<<<%s>>>>" %
data.get("name").replace(" ", "_")
print "<<<esx_vsphere_vm>>>"
entries = list(data.items())
entries.sort()
@@ -580,7 +580,7 @@ if not error:
for key in sorted(vms.keys()):
data = vms[key]
running_on = hostsystem_name.get(data.get("runtime.host"),
data.get("runtime.host"))
- print "virtualmachine\t%s\t%s\t%s" %
(data.get("name").replace(" ","_"), running_on,
data.get("runtime.powerState"))
+ print "virtualmachine\t%s\t%s\t%s" %
(data.get("name").replace(" ", "_"), running_on,
data.get("runtime.powerState"))
except Exception, e:
if opt_debug: