Module: check_mk
Branch: master
Commit: 22e180abfccd0461ac5906ff304b5ed29acc81ff
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=22e180abfccd04…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jul 3 14:51:47 2018 +0200
6320 FIX Some services (e.g. Linux Memory) were using wrong perfometers
Change-Id: Icdb9074f706e394a3dddd84a2b9733fd89755e84
---
.werks/6320 | 11 +++++++++++
web/htdocs/metrics.py | 6 ++++++
2 files changed, 17 insertions(+)
diff --git a/.werks/6320 b/.werks/6320
new file mode 100644
index 0000000..b648204
--- /dev/null
+++ b/.werks/6320
@@ -0,0 +1,11 @@
+Title: Some services (e.g. Linux Memory) were using wrong perfometers
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1530622280
+
+
diff --git a/web/htdocs/metrics.py b/web/htdocs/metrics.py
index bc6aa27..8cc4069 100644
--- a/web/htdocs/metrics.py
+++ b/web/htdocs/metrics.py
@@ -575,6 +575,12 @@ def parse_perf_data(perf_data_string, check_command=None):
varname, values = part.split("=", 1)
varname = cmk.utils.pnp_cleanup(varname.replace("\"",
"").replace("\'", ""))
+ # Enforce varname to be a byte string for the moment. The plugins currently
register
+ # the plugins with byte string varnames. In the long term this needs to be
cleaned up
+ # to be unicode strings just like all internal strings. But for the moment
the mixup
+ # would confuse e.g. dict lookups etc.
+ varname = varname.encode("utf-8")
+
value_parts = values.split(";")
while len(value_parts) < 5:
value_parts.append(None)