[checkmk-commits] Check_MK Git: check_mk: FIX: mkeventd: fixed bug in rule optimizer

git version control git at mathias-kettner.de
Sun Nov 18 14:11:05 CET 2012


Module: check_mk
Branch: master
Commit: a3828c730be0af1f45eaa2e5cd88406ec632eb39
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a3828c730be0af1f45eaa2e5cd88406ec632eb39

Author: Mathias Kettner <mk at mathias-kettner.de>
Date:   Sun Nov 18 14:06:00 2012 +0100

FIX: mkeventd: fixed bug in rule optimizer

---

 ChangeLog             |    1 +
 mkeventd/bin/mkeventd |    3 ++-
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 54df6e0..3de6b68 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 1.2.1i3:
     Event Console:
     * New performance counter for client request processing time
+    * FIX: fixed bug in rule optimizer with ranges of syslog priorities
 
 
 1.2.1i2:
diff --git a/mkeventd/bin/mkeventd b/mkeventd/bin/mkeventd
index f17a38e..11fd3a5 100755
--- a/mkeventd/bin/mkeventd
+++ b/mkeventd/bin/mkeventd
@@ -974,7 +974,8 @@ class EventServer:
         for key in [ "match_priority", "cancel_priority" ]:
             if key in rule:  
                 prio_from, prio_to = rule[key]
-                for p in range(prio_from, prio_to+1):
+                # Beware: from > to!
+                for p in range(prio_to, prio_from + 1):
                     needed_prios[p] = True
             elif key == "match_priority": # all priorities match
                 needed_prios = [True] * 8 # needed to check this rule for all event priorities



More information about the checkmk-commits mailing list