Module: check_mk
Branch: master
Commit: 742869f0d6a43ee2aae6dab07941ae195633ff6d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=742869f0d6a43e…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu May 28 15:57:24 2015 +0200
#2281 FIX mkeventd: fix: now able to create notifications with events containing umlauts
The event console was unable to create a notification for a event if it contained umlauts
like ä, ö, etc.
The event itself got created, just the notification part was missing.
---
.werks/2281 | 11 +++++++++++
ChangeLog | 1 +
mkeventd/bin/mkeventd | 1 +
3 files changed, 13 insertions(+)
diff --git a/.werks/2281 b/.werks/2281
new file mode 100644
index 0000000..bbce732
--- /dev/null
+++ b/.werks/2281
@@ -0,0 +1,11 @@
+Title: mkeventd: fix: now able to create notifications with events containing umlauts
+Level: 2
+Component: ec
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1432821086
+
+The event console was unable to create a notification for a event if it contained umlauts
like ä, ö, etc.
+The event itself got created, just the notification part was missing.
diff --git a/ChangeLog b/ChangeLog
index d20d8fa..a2cd837 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -578,6 +578,7 @@
* 2133 FIX: Fix visualization of global EC setting for Rule Optimizer...
* 2139 FIX: Fix exception in Event Console when archiving events with match groups
and non ASCII characters
* 2151 FIX: Fixed wrong time in events when forwarding logwatch to EC between
timezones...
+ * 2281 FIX: mkeventd: fix: now able to create notifications with events containing
umlauts...
Livestatus:
* 2229 Do not fail on non-existing Livestatus columns any longer, output None or null
instead...
diff --git a/mkeventd/bin/mkeventd b/mkeventd/bin/mkeventd
index 325d455..b2bd1be 100755
--- a/mkeventd/bin/mkeventd
+++ b/mkeventd/bin/mkeventd
@@ -3289,6 +3289,7 @@ def do_notify(event, username, is_cancelling):
# Send notification context via stdin.
context_string = "".join([ "%s=%s\n" % (varname,
value.replace("\n", "\\n")) for (varname, value) in context.items()
])
+ context_string = to_utf8(context_string)
p = subprocess.Popen(["cmk", "--notify", "stdin"],
stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
response = p.communicate(input=context_string)[0]
status = p.returncode