[ZBXNEXT-410] Add more filters to the Events page Created: 2010 Jun 14  Updated: 2017 Jul 19  Resolved: 2017 Jul 19

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Frontend (F)
Affects Version/s: 1.8.2
Fix Version/s: None

Type: Change Request Priority: Major
Reporter: Vide Assignee: Unassigned
Resolution: Duplicate Votes: 29
Labels: events, filters, patch
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File 0001-ZBXNEXT-410-both-patches.patch     File ZBXNEXT-410_Add_more_filters_to_events-2.4.2.patch     Text File ZBXNEXT-410_Add_more_filters_to_events-2.4.7.patch     PNG File event_filter_new.png     File zabbix-2.0.4-add_event_filter.patch     File zabbix-2.0.4-filter_events_by_trigger_description.patch     File zabbix-2.0.5-zbxnext410-total.patch     File zabbix-2.2.5-ZBXNEXT-410-2.patch     File zabbix-2.2.5-ZBXNEXT-410-Add-more-filters-to-the-Events-page.patch    
Issue Links:
Duplicate
duplicates ZBXNEXT-3201 New high-performance view of current ... Closed
is duplicated by ZBXNEXT-1823 New Filter on events with only Problem Closed
is duplicated by ZBX-3345 Sorting or Filtering Severity of even... Closed

 Description   

It would be great to have the possibility to filter the Events based on:

  • a starting/ending date, not just a starting date/now like now
  • status: I'd like to see only problematic events, or only OK events (or both)
  • severity: filter out the not-so-important events
  • ACK: filter out the events that was acknowledged.

It would be very useful when creating reports or checking operators behavior

Thanks!.



 Comments   
Comment by richlv [ 2010 Jun 14 ]

1. - available in 1.8.3
2. probably checkboxes for ok/problem/unknown (currently only unknown can be hidden);
3. ideally, severity checkboxes (helpful also for zabbix configuration reviewing)
4. look for ack/nonack events
5. filter for events with ok/nonok actions

Comment by Volker Fröhlich [ 2012 Feb 15 ]

Right now, you may only filter for a specific trigger on a specific host. It does not allow to filter on a trigger from a template. Filtering on trigger description might also be great, if not better.

Comment by Takanori Suzuki [ 2012 Oct 12 ]

Hi, I'm Takanori Suzuki working at Miracle Linux.
We made an attached patch to add event filter for Zabbix 2.0.3.
It adds "trigger status", "acknowledges status" and "severity level" filters.

  • About implementation
    We extended "Event" API function, but it just adds additional option, so usually it doesn't affect to existing API using code.
    Though extending API function might be problem to be accepted.
Comment by Takanori Suzuki [ 2012 Dec 26 ]

Sorry, the previous post patch has problem in CSV output processing.
In CSV output processing, "$config['event_ack_enable']" doesn't exist and it failed to output.
I fixed my patch to make $config before using.

Comment by Volker Fröhlich [ 2013 Feb 11 ]

Thank you Takanori, your patch works fine for me.

Comment by Volker Fröhlich [ 2013 Feb 11 ]

zabbix-2.0.4-filter_events_by_trigger_description.patch allows to filter by trigger description, much like on the tr_status page.

Comment by Volker Fröhlich [ 2013 Feb 12 ]

Filtering with the two patches combined

Comment by Andrey Shpak [ 2013 Feb 28 ]

Tested on centos epel 205 distrib.
First patch works fine.
Second works with some manual corrections if the first one installed.

Errors:

--- events.php  2012-12-08 12:09:20.000000000 +0100
+++ events.php  2013-02-11 16:23:43.119990951 +0100
@@ -116,6 +117,7 @@
 if (isset($_REQUEST['filter_rst'])) {
        $_REQUEST['triggerid'] = 0;
        $_REQUEST['showUnknown'] = 0;
+       $_REQUEST['txt_select'] = '';
 }

 $source = get_request('triggerid') > 0 ? EVENT_SOURCE_TRIGGERS
@@ -123,6 +125,7 @@

 $_REQUEST['triggerid'] = get_request('triggerid', CProfile::get('web.events.filter.triggerid', 0));
 $_REQUEST['showUnknown'] = get_request('showUnknown', CProfile::get('web.events.filter.showUnknown', 0));
+$_REQUEST['txt_select'] = get_request('txt_select', CProfile::get('web.events.filter.txt_select', ''));

 // Change triggerId filter if change hostId
 if (($_REQUEST['triggerid'] > 0) && isset($_REQUEST['hostid'])) {
@@ -224,6 +227,7 @@
 if (isset($_REQUEST['filter_set']) || isset($_REQUEST['filter_rst'])) {
        CProfile::update('web.events.filter.triggerid', $_REQUEST['triggerid'], PROFILE_TYPE_ID);
        CProfile::update('web.events.filter.showUnknown', $_REQUEST['showUnknown'], PROFILE_TYPE_INT);
+       CProfile::update('web.events.filter.txt_select', $_REQUEST['txt_select'], PROFILE_TYPE_STR);
 }
 // --------------
Comment by Volker Fröhlich [ 2013 Apr 09 ]

There seems to be a flaw with the Duration column. The calculated durations are wrong if filtered by trigger status.

Comment by Volker Fröhlich [ 2013 May 06 ]

Cumulative patch including duration fix uploaded

Comment by Volker Fröhlich [ 2013 Nov 14 ]

Cumulative patch for 2.2.0; please don't let me port it to 2.4 as well!

Comment by Michael Schwartzkopff [ 2014 May 07 ]

Hi,

I would like to see that feature: Filter events by severity.

Michael.

Comment by Erwin Vrolijk [ 2014 Jun 27 ]

Please add this to the next 2.2 or 2.4

Filtering events by severity is very usefull, in particular if triggers with a 'not classified' severity are used to change colors of links on a map the event list gets cluttered.

Comment by Volker Fröhlich [ 2014 Aug 28 ]

Adapted patch to fit 2.2.5

Comment by Volker Fröhlich [ 2014 Nov 05 ]

Paging doesn't work with the patches

Comment by Volker Fröhlich [ 2014 Nov 06 ]

zabbix-2.2.5-ZBXNEXT-410-2.patch hat the paging problem solved, but I discovered ZBX-9003.

Comment by Corey Shaw [ 2014 Nov 11 ]

Ported to 2.4.2. This port includes the paging bug fix that Volker fixed.

Comment by Erik Skytthe [ 2015 Feb 07 ]

Nice features! Today you cannot get an overview of only high events/triggers in an specific periode. It is difficult to report impact back to management, when bigger problems occurs.

The ability to filter on status, gives a much better overview on events = only one line per event.
/Erik

Comment by peter erbst [ 2015 Feb 11 ]

after applying the 2.4.2 patch, it's sort of working, but throws this error at the end of the page:

Undefined index: searchWildcardsEnabled [events.php:740 → CFrontendApiWrapper->get() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CEvent->get() → zbx_db_search() in /var/www/html/include/db.inc.php:777]

Comment by storex [ 2015 Dec 16 ]

Ported to 2.4.7

Comment by Volker Fröhlich [ 2016 Sep 09 ]

I think this can be closed as "Fixed in 3.2"!

Comment by Alexander Vladishev [ 2017 Jul 19 ]

Already implemented under ZBXNEXT-3201.

Comment by Vide [ 2017 Jul 19 ]

I'm glad it was finally implemented in ZBXNEXT-3201 but my issue predates the other one by 6 years so closing this as "duplicates" seems at least... odd

Generated at Wed Apr 24 18:41:41 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.