Module: check_mk
Branch: master
Commit: b7b415e2ee2d57f0b590605b5fdff67913b934dc
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b7b415e2ee2d57…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Jul 11 15:00:29 2017 +0200
4846 FIX ESX monitoring: fixed incomplete data, when the xml response from the esx server
includes newlines
In most scenarios, the xml response never has a newline.
There was an instance, where a newline was entered into a comment field.
This newline broke the xml parser...
Change-Id: Ia7ffa9d5d7fef40fcefd02b3bfa7a1c6677dd8a0
---
.werks/4846 | 13 +++++++++++++
agents/special/agent_vsphere | 2 +-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/4846 b/.werks/4846
new file mode 100644
index 0000000..e4e736d
--- /dev/null
+++ b/.werks/4846
@@ -0,0 +1,13 @@
+Title: ESX monitoring: fixed incomplete data, when the xml response from the esx server
includes newlines
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1499777566
+Class: fix
+
+In most scenarios, the xml response never has a newline.
+There was an instance, where a newline was entered into a comment field.
+This newline broke the xml parser...
+
diff --git a/agents/special/agent_vsphere b/agents/special/agent_vsphere
index 9424d01..2916b4a 100755
--- a/agents/special/agent_vsphere
+++ b/agents/special/agent_vsphere
@@ -1016,7 +1016,7 @@ if opt_tracefile:
def get_pattern(pattern, line):
if not line:
return []
- p = re.compile(pattern)
+ p = re.compile(pattern, re.MULTILINE)
return p.findall(line)
if tracefile: