Module: check_mk
Branch: master
Commit: 7518b89b87a8b93390d1ac6850bfbd3e2d3e29ee
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7518b89b87a8b9…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Apr 14 12:12:08 2016 +0200
3026 FIX Event console: The "Add comment" option of a rule is now able to add
the original text (\0)
---
.werks/3026 | 9 +++++++++
ChangeLog | 1 +
bin/mkeventd | 4 ++--
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/.werks/3026 b/.werks/3026
new file mode 100644
index 0000000..38e7a5d
--- /dev/null
+++ b/.werks/3026
@@ -0,0 +1,9 @@
+Title: Event console: The "Add comment" option of a rule is now able to add the
original text (\0)
+Level: 1
+Component: ec
+Compatible: compat
+Version: 1.2.9i1
+Date: 1460628605
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index fd5d4e5..15ae1f2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -296,6 +296,7 @@
* 3348 FIX: Improved error handling when trying to edit not existing rules/rule
packs
* 3350 FIX: Merged source of Event Console with Check_MK...
* 3240 FIX: Fixed various quotation issues in GUI parts related to the EC
+ * 3026 FIX: Event console: The "Add comment" option of a rule is now able
to add the original text (\0)
Livestatus:
* 3233 FIX: Fixed shutdown of Nagios core with Livestatus module...
diff --git a/bin/mkeventd b/bin/mkeventd
index 7d2a696..3e41564 100755
--- a/bin/mkeventd
+++ b/bin/mkeventd
@@ -2116,12 +2116,12 @@ class EventServer:
event["sl"] = rule["sl"]
event["first"] = event["time"]
event["last"] = event["time"]
+ if "set_comment" in rule:
+ event["comment"] = replace_groups(rule["set_comment"],
event["text"], groups)
if "set_text" in rule:
event["text"] = replace_groups(rule["set_text"],
event["text"], groups)
if "set_host" in rule:
event["host"] = replace_groups(rule["set_host"],
event["host"], groups)
- if "set_comment" in rule:
- event["comment"] = replace_groups(rule["set_comment"],
event.get("comment", ""), groups)
if "set_application" in rule:
event["application"] =
replace_groups(rule["set_application"], event["application"], groups)
if "set_contact" in rule and "contact" not in event: