[ZBXNEXT-6069] Generic Filter Language for all UI pages Created: 2020 Jul 14  Updated: 2024 Sep 19

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

Type: New Feature Request Priority: Major
Reporter: Christian Anton Assignee: Valdis Murzins
Resolution: Unresolved Votes: 9
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File monitor-filter_builder.png    

 Description   

In Zabbix, there are filters everywhere, both in configuration and display contexts: in list of hosts, templates, “Latest data”, Problems view etc. These filters have been extended more and more during the last releases, and they already look quite “overloaded” on one hand, and on the other hand they are still missing quite a lot of useful functionalities which almost all bigger customers (and not only those) do strongly wish:

  • Filtering by regular expressions, i.e. in host name, …
  • IP filtering by CIDR notation in interface addresses
  • Negating and concatenating filters (“all hosts being part of hostgroup “A” whose host name matches regular expression ‘^db[0-9]”’ and which are assigned to this and that template” or “all hosts being part of hostgroup “B” who do not have tag “C” assigned", for example)
  • Filter by responsible person, by amount of problems
  • A lot more…

Additionally, there is a strong need to make the UI pages more flexible: currently, applied filters are saved in cookies, which causes a lot of undesired situations, such as a page showing up a different search result, host data, etc. than expected. This has been seen as very annoying by a lot of users.

Another annoying thing is, that for example in the problems-widget on a dashbboard one can exclude one or more hostgroups. But this seems not possible on the problems view, even if the filters else look very similar.

 

A good and forward-looking solution would be an approach such as Atlassian Jira’s: in all pages where filters may be needed, the content is totally customizable by using a generic query language. Same has been seen at some monitoring solutions (Nagios based, see screenshot attached).

A query language like that, combined with a graphical "filter builder" to help figuring out which possibilities there are to filter the current view, and probably even still some check boxes like those existing currently (“show acknowledged” and such) which change the query language parameters inline by pressing them, would make the whole Zabbix user interface much more flexible and better to use in large environments. Those same filters could be used inside of dashboard widgets, in the graph widget, in future maybe even in custom graphs (making them dynamic), in maps (to show, i.e. not just "one host group of hosts" but those exactly matching such a filter) and much more.

Beside of the above described, I believe it would make sense to hand over the queries in URL parameters. This way, a proper “navigating back” would be possible, permalinks with queries included could be handed over to coworkers etc. Additionally such queries could be saved as “saved searches”, been combined with user permissions (like dashboards etc.) and this way be visible and quickly accessible for other users.

As I have seen in other monitoring solutions, one possible way to implement could be to include the actual type of information (problems, latest data, …) to see in the query. This way, one query would clearly tell the UI which page to render. This would allow also custom frontend modules to integrate into such a filtering sub system.



 Comments   
Comment by Andrei Gushchin (Inactive) [ 2020 Jul 15 ]

Thank you for detailed describing your idea.

Comment by Carl Slaughter [ 2020 Oct 26 ]

This may be a bit simplistic, but adding an exclude option to the search..

Example
Host group=North_America -exclude=New_York

Comment by Dmitry Sergienko [ 2024 Sep 19 ]

This is really useful idea which can solve lots of common problems: from data analysis to inventory management.

To make this filtering language even more powerful, it would be great to have pivot functionality with drill-down.

For example, get all hosts from groups grp1, grp2 with template "docker" having tag regexp 'container:.*api-\d+' group by key regexp 'docker\..*\.status', host

 

Then we have a table with summary information, i.e. count of hosts by container state, can click through, search query will be rewritten to show not consolidated data.

Plus ability to save query

Plus ability to show its result on a dashboard widget

Plus export data to CSV

 

Generated at Sun Mar 16 03:46:49 EET 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.