introduced with WK5254
Message-ID: <5a54a0f1.kUo7GWMLKcDEL8cu%ab(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.5 6/20/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: 9f5cefe1de087b5b9a6836806860b3d0a06216e5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9f5cefe1de087b…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Jan 9 11:55:40 2018 +0100
5256 FIX mkeventd: fixed two bugs regarding rule matching, introduced with WK5254
Change-Id: Icc5b5558d1a5f7436429757dd7f015ea18b3b2dd
---
.werks/5256 | 10 ++++++++++
bin/mkeventd | 4 ++--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/.werks/5256 b/.werks/5256
new file mode 100644
index 0000000..a71f562
--- /dev/null
+++ b/.werks/5256
@@ -0,0 +1,10 @@
+Title: mkeventd: fixed two bugs regarding rule matching, introduced with WK5254
+Level: 1
+Component: ec
+Compatible: compat
+Edition: cee
+Version: 1.5.0i3
+Date: 1515495316
+Class: fix
+
+
diff --git a/bin/mkeventd b/bin/mkeventd
index dbe1fad..5fb6582 100755
--- a/bin/mkeventd
+++ b/bin/mkeventd
@@ -2604,14 +2604,14 @@ class EventServer(ECServerThread):
########################################################
# Check create-event
if match_groups["match_groups_message"] != False and\
- match_groups.get("match_groups_syslog_application", False) != False
and\
+ match_groups.get("match_groups_syslog_application", ()) != False
and\
match_priority["has_match"] == True:
if g_config["debug_rules"]:
self.logger.info(" found new event")
return False, match_groups
# Check canceling-event
- has_canceling_condition = bool(x for x in ["match_ok",
"cancel_application", "cancel_priority"] if x in rule)
+ has_canceling_condition = bool([x for x in ["match_ok",
"cancel_application", "cancel_priority"] if x in rule])
if has_canceling_condition:
if ("match_ok" not in rule or
match_groups.get("match_groups_message_ok", False) != False) and\
("cancel_application" not in rule or
match_groups.get("match_groups_syslog_application_ok", False) != False) and\