Module: check_mk
Branch: master
Commit: 9636785b6db27db0e3fb44cbfddd4cc60da4e777
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9636785b6db27d…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Fri Aug 14 15:28:53 2015 +0200
#2526 FIX Fixed failing check when performance data contains unicode strings
---
.werks/2526 | 9 +++++++++
ChangeLog | 1 +
modules/check_mk_base.py | 3 ++-
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/2526 b/.werks/2526
new file mode 100644
index 0000000..a87b926
--- /dev/null
+++ b/.werks/2526
@@ -0,0 +1,9 @@
+Title: Fixed failing check when performance data contains unicode strings
+Level: 1
+Component: core
+Compatible: compat
+Version: 1.2.7i3
+Date: 1439558918
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index a3238a8..10d94d8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
Core & Setup:
* 2465 FIX: Fixed broken Check_MK Discovery checks (check reports
"(null)")
* 2502 FIX: Fixed removing autochecks when a host is configured to be ping only...
+ * 2526 FIX: Fixed failing check when performance data contains unicode strings
Checks & Agents:
* 2312 New checks for EMC VPLEX: emc_vplex_cpu, emc_vplex_director_stats,
emc_vplex_if, emc_vplex_volumes...
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index 1d27735..cd0132e 100644
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -1809,7 +1809,8 @@ def submit_check_result(host, servicedesc, result, sa,
cached_at=None, cache_int
p = ''
color = { 0: tty_green, 1: tty_yellow, 2: tty_red, 3: tty_magenta }[state]
print "%-20s %s%s%-56s%s%s" % (servicedesc.encode('utf-8'),
- tty_bold, color,
make_utf8(infotext.split('\n')[0]), tty_normal, p)
+ tty_bold, color,
make_utf8(infotext.split('\n')[0]),
+ tty_normal, make_utf8(p))
def submit_to_core(host, service, state, output, cached_at = None, cache_interval =
None):