Module: check_mk
Branch: master
Commit: 62a1b70bdc956a6c9a6806c887705a6d31aa68a4
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=62a1b70bdc956a…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Jun 24 16:45:22 2013 +0200
Predictive monitoring: correctly handle spaces in variable names
---
ChangeLog | 2 ++
modules/prediction.py | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7d7df0a..e39a853 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,8 @@
Note: If the ignore rule is removed the services will reappear
* Config creation: The ignore services rule now also applies to custom, active
and legacy checks
+ * Predictive monitoring: correctly handle spaces in variable names (thanks
+ to Karl Golland)
Checks & Agents:
* esx_hostystem multipath: criticize standby paths only if not equal to active paths
diff --git a/modules/prediction.py b/modules/prediction.py
index 138e7d9..8d9a741 100644
--- a/modules/prediction.py
+++ b/modules/prediction.py
@@ -74,8 +74,8 @@ def find_ds_in_pnp_xmlfile(xml_file, varname):
ds = line[4:].split('<')[0]
if name == varname:
return int(ds)
- elif line.startswith("<NAME>"):
- name = line[6:].split('<')[0]
+ elif line.startswith("<LABEL>"):
+ name = line[7:].split('<')[0]
if ds and name == varname:
return int(ds)
else: