Module: check_mk
Branch: master
Commit: cbbfca5aeb4cd82a866f226e756e60bdebb06950
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=cbbfca5aeb4cd8…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Jun 3 14:43:07 2015 +0200
#2305 FIX agent_vsphere, esx_vsphere_sensors: now able to handle sensor names with
semicolon
The esx_vsphere_sensors check crashed when there was a semicolon in the sensor name
E.g. <tt>Controller 500605B002DB9F70 (ServeRAID M5015 SAS/SATA Controller) n/a
(Package); 12.7.0-0020 (Fw)</tt>
---
.werks/2305 | 12 ++++++++++++
ChangeLog | 1 +
agents/special/agent_vsphere | 2 +-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/2305 b/.werks/2305
new file mode 100644
index 0000000..5d81b40
--- /dev/null
+++ b/.werks/2305
@@ -0,0 +1,12 @@
+Title: agent_vsphere, esx_vsphere_sensors: now able to handle sensor names with
semicolon
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i2
+Date: 1433335253
+
+The esx_vsphere_sensors check crashed when there was a semicolon in the sensor name
+E.g. <tt>Controller 500605B002DB9F70 (ServeRAID M5015 SAS/SATA Controller) n/a
(Package); 12.7.0-0020 (Fw)</tt>
+
diff --git a/ChangeLog b/ChangeLog
index c37dd47..5126fe9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
* 2117 postfix_mailq: agent and check now retrieve and monitor active queue data as
well
* 2325 oracle_tablespaces: correctly handle case where check runs in clustered
mode...
* 2323 FIX: df: Fix new graphs for all filesystem checks in case of existing inode
information
+ * 2305 FIX: agent_vsphere, esx_vsphere_sensors: now able to handle sensor names with
semicolon...
Multisite:
* 2260 Improved load time of Check_MK GUI...
diff --git a/agents/special/agent_vsphere b/agents/special/agent_vsphere
index 156e329..84f97eb 100755
--- a/agents/special/agent_vsphere
+++ b/agents/special/agent_vsphere
@@ -919,7 +919,7 @@ if not error:
data = hostsystems_sensors[hostname][key]
if data["key"] in ["green",
"unknown"]:
continue
- line = '%s;%s;%s;%s;%s;' % (data["name"],
data["baseUnits"], data["currentReading"],
+ line = '%s;%s;%s;%s;%s;' %
(data["name"].replace(";", "_"),
data["baseUnits"], data["currentReading"],
data["sensorType"],
data["unitModifier"])
if "rateUnits" in data:
line += data["rateUnits"]