[checkmk-commits] Check_MK Git: check_mk: #1974 FIX Event console views were randomly ignoring host filters

Lars Michelsen lm at mathias-kettner.de
Mon Feb 2 13:44:46 CET 2015


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

Author: Lars Michelsen <lm at mathias-kettner.de>
Date:   Mon Feb  2 13:44:40 2015 +0100

#1974 FIX Event console views were randomly ignoring host filters

Some times the event console views were accessed with a host filter,
for example using the name of a host, the view was showing events
which did not belong to this host. After reloading the page, the
view was showing a correctly filtered list again some times.

---

 .werks/1974                            |   13 +++++++++++++
 ChangeLog                              |    1 +
 mkeventd/web/plugins/views/mkeventd.py |    5 ++---
 3 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/.werks/1974 b/.werks/1974
new file mode 100644
index 0000000..6cb7863
--- /dev/null
+++ b/.werks/1974
@@ -0,0 +1,13 @@
+Title: Event console views were randomly ignoring host filters
+Level: 1
+Component: ec
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1422880977
+
+Some times the event console views were accessed with a host filter,
+for example using the name of a host, the view was showing events
+which did not belong to this host. After reloading the page, the
+view was showing a correctly filtered list again some times.
diff --git a/ChangeLog b/ChangeLog
index 6bace5b..6ca25b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -208,6 +208,7 @@
     * 1878 SEC: Fixed possible shell injection when filtering the EC archive...
     * 1839 FIX: Fix exception when notifying EC alert into monitoring for traps (because PID is missing)
     * 1813 FIX: Fixed bug in event console rule editor when no contact groups configured
+    * 1974 FIX: Event console views were randomly ignoring host filters...
 
     HW/SW-Inventory:
     * 1846 Keep track of changes of software and hardware...
diff --git a/mkeventd/web/plugins/views/mkeventd.py b/mkeventd/web/plugins/views/mkeventd.py
index abab801..7afca6c 100644
--- a/mkeventd/web/plugins/views/mkeventd.py
+++ b/mkeventd/web/plugins/views/mkeventd.py
@@ -42,7 +42,7 @@ except:
 #   '----------------------------------------------------------------------'
 
 def table_events(what, columns, add_headers, only_sites, limit, filters):
-    # First we wetch the list of all events from mkeventd - either current
+    # First we fetch the list of all events from mkeventd - either current
     # or historic ones. We ignore any filters for host_ here. Note:
     # event_host and host_name needn't be compatible. They might differ
     # in case. Also in the events table instead of the host name there
@@ -139,7 +139,7 @@ def table_events(what, columns, add_headers, only_sites, limit, filters):
             filter_code = filt.filter('event')
             if filter_code:
                 have_host_filter = True
-            break
+                break
 
     if not have_host_filter:
         # Create empty host for outer join on host table
@@ -148,7 +148,6 @@ def table_events(what, columns, add_headers, only_sites, limit, filters):
         empty_host["host_state"] = 0
         empty_host["host_has_been_checked"] = 0
 
-
     # We're ready to join the host-data with the event data now. The question
     # is what to do with events that cannot be mapped to a host...
     new_rows = []



More information about the checkmk-commits mailing list