[ZBXNEXT-8145] Communication framework for widgets Created: 2022 Dec 08  Updated: 2025 Mar 28

Status: Doc. sign-off
Project: ZABBIX FEATURE REQUESTS
Component/s: Frontend (F)
Affects Version/s: None
Fix Version/s: 7.0.0alpha5, 7.0 (plan)

Type: Change Request Priority: High
Reporter: Alexei Vladishev Assignee: Andrejs Verza
Resolution: Unresolved Votes: 10
Labels: None
Remaining Estimate: 8h
Time Spent: 28h
Original Estimate: Not Specified

Attachments: PNG File image-1.png     PNG File image-2023-09-25-15-21-49-267.png     PNG File image.png     PNG File invalid_sla_widget_error.png     GIF File issues_with_sidget_multiselects.gif     PNG File less_informative_validation.png     PNG File limited_sla_report_period.png     GIF File missing_period_length_validation.gif     PNG File multiselect_shift_1px.png     GIF File overwtiting_hosts_error.gif     PNG File preloader-after.png     PNG File preloader-before.png     PNG File preloader-favorite-graphs.png     PNG File screenshot-1.png     PNG File screenshot-2.png     PNG File screenshot-3.png     GIF File select_dashboard_error.gif     GIF File two_symbols_autocomplete.gif    
Issue Links:
Causes
causes ZBX-23562 Validation for maximum time period wo... Closed
Duplicate
Team: Team A
Target end:
Sprint: Sprint 98 (Mar 2023), Sprint 99 (Apr 2023), Sprint 100 (May 2023), Sprint 101 (Jun 2023), Sprint 102 (Jul 2023), Sprint 103 (Aug 2023), Sprint 104 (Sep 2023), Sprint 105 (Oct 2023), Sprint 106 (Nov 2023), S24-W8/9, Prev.Sprint, S24-W10/11, S24-W12/13, S24-W14/15, S24-W16/17, S24-W46/47, S24-W48/49, S25-W6/7, S25-W10/11
Story Points: 9

 Description   

Currently dashboard widgets are unable to communicate with each other. It makes impossible creation of dashboards with user navigation, when one widget is used for navigation (for example, item tree for item selection) and other widgets display information about the selected element (for example: last value, graph for the selected item).

We need to support well-defined communication framework (a message bus) to address this.



 Comments   
Comment by Ryan Eberly [ 2023 Jan 20 ]

I'm not sure how far along this is in the design / development process, but is there a plan to make this extensible in such a way where we could create a single dashboard that would enable the ability to filter all widgets by a specific host group or regex of a host group? For example, expanding on "Enable host selection" so that every widget can be filtered by a host host or whole host group?

 

Additionally I could envision a filter option that displays available values based on a dashboard filter of hosts/host groups/items. Say you're ingesting process memory usage for some processes. It would be neat to be able to toggle the display of those metrics in a graph on and off with some radio buttons.

 

In summary, thinking about how to make dashboards more dynamic would be a great direction to take this idea so that we could have templates that are filterable in many ways ( hosts, host groups and/or items)

Comment by Alexei Vladishev [ 2023 Jan 30 ]

GRyan337, absolutely! The idea is to enable creation of truly dynamic dashboards, i.e. dashboards where one or more widgets can control behaviour of other widgets. As in one of your examples, a filter widget may control what information other widgets should display depending on its filtering options.

Comment by Ryan Eberly [ 2023 Feb 02 ]

This will really improve dashboard creation. As you know it requires a lot of code to "automate" dashboard creation and updates for instances with 100s of dashboards. I would really like all of our host groups (300+) to have the same dashboard where I could just filter the dashboard by any of the host groups. But currently, I'd have to create a dashboard for each and that requires a lot of custom code with the API. It's doable, but any changes you want on those dashboards has to be done 300+ times (once for each host group). 

 

I'm anticipating that these filter capabilities will really make the Zabbix administrator's job much easier.

 

Comment by Alexei Vladishev [ 2023 Feb 02 ]

Are you aware of template dashboards? We are working to make them extremely powerful by enabling all types of widgets and introducing many new widgets. So basically, you would create dashboards on the template level, and then these dashboards will be immediately accessible for each linked host. No need to replicate dashboards. For higher-level dashboards (like host group-level aggregations), this communication framework will help a lot. Also, we want to introduce the ability to navigate from one dashboard to another with just one click, and it is all coming soon.

Comment by Ryan Eberly [ 2023 Feb 03 ]

Hi Alexei. Yes I'm aware of template dashboards, but due to the widget restriction we haven't used them. I did see the ticket for making the widgets universal and I think I upvoted it 🙂. I planned to revisit them when that is released. The other reason we haven't used template dashboards is click count. Our monitoring needs are focused more on process and software monitoring so we have many indicators that go beyond the the overall server. We might have dozens of hosts in one host group and having to cycle through a lot of graphs required a lot of clicks. For that reason we've leveraged triggers as much as possible. We've written some very complex triggers! The problems by severity widget enabled us to then create a truly single pane of glass dashboard, showing us all the areas that need attention "right now" on a host group. But we are starting to see other use cases for using the vector graph, top hosts, (top items when it's released!) and data overview. It's a challenge to put so much information for all the hosts of a host group on a dashboard and make it easy to navigate and intuitive to use.

 

 

Here are two examples: I have 2 switches on one host group and I need to see egress bandwidth in rate for both. I could put them on one graph but the scale is different between the two switches. One might be in the Kbps range while the other is 100s of Gbps. In this case I can use the left and right y axis. But in many cases I have more than 2 switches and it varies depending on the facility / host groups. Having a filter widget in the dashboard would solve this dilemma if I'm able to selectively turn on and off the metrics for those switches. Another solution could be to add logarithmic scaling in the graph widget with something like base10.

 

Another example is one of our software applications is configured differently for every host group. It runs parallel threads and we watch the CPU usage of all of them. This looks really nice in the top hosts widget across a host group because we can set ranges where if the thread is averaging 98% CPU usage we color code it red and we can quickly see which hosts and threads and the busiest, but you have to choose the items individually in the top hosts wodget. So if one host groups runs 10 of these threads but a different host groups runs 20 then I need to write code to handle creating the corresponding number of bars in the top hosts widget. Furthermore, sometimes we change the thread count on the fly and 10 becomes 25. It'd be good to just be able to wildcard the metric name or use item tags. This way the top hosts widget would change dynamically as my environment changes.

 

I know this was a bit long and hope the descriptions made sense to give you an understanding of some of the complex scenarios we have encountered while trying to monitor our environment with Zabbix.

 

Comment by Alexei Vladishev [ 2023 Feb 14 ]

GRyan337 , thanks for the followup, it all makes sense. I think that one-click navigation between various dashboards and advanced new and existing widgets is what we need, working on it!

Comment by Ryan Eberly [ 2023 Feb 15 ]

Looking forward to it from a pure administration standpoint. This will make it much easier to give my users the dashboards they're looking for without having to write lots of custom code to handle every possible scenario (i.e. the examples above). As soon as this shows up in a release candidate I'll install it to check out what you all came up with. This functionality will be really important moving forward, especially for the new framework for allowing custom widget creation.

Comment by Ryan Eberly [ 2023 Mar 13 ]

With this being pushed off to 7.0 LTS, I've thought about some features that will be very important for large deployments. It's possible that you already thought about these already:

(Note - I haven't seen a separate ticket for the item and host tree navigation, so I'm adding these comments here)

  1. Both host and item tree navigation should provide similar pre-filters as the Problems By Severity widget: specifically, the ability to include and exclude host groups and hosts, and item and host tags. It'll probably be necessary to also allow an item list or item pattern filtering option, like the one that exists in the Graph widget already, for those users who aren't making use of tags. These filters will be crucial for very large deployments where presenting "everything" will be too overwhelming for users.
  2. Both host and item tree should allow for linkage to one or more specific widgets on a dashboard and page. This would be similar to the map navigation tree where we can link it to a map, but it'd be good to be able to link to multiple widgets across pages. It should also have an option to filter all widgets in a dashboard with a single checkbox item as well.
  3. Multi-select checkbox options should be included to enable toggling on/off multiple item and host selections to make filtering as flexible as possible for users. For example, if I have a graph that aggregates all switch ports on a switch with an aggregation function, it'd be great to allow users to be able to select individual switch ports (items) to dynamically change the graph dataset as they need.

Of course, these are just a few ideas. Hopefully there are others out there that can provide 

Comment by Alexei Vladishev [ 2023 Mar 14 ]

GRyan337, everything you mentioned will be implemented. It is all planned for 7.0.

Comment by patrik uytterhoeven [ 2023 Mar 14 ]

nice looking forward to this in 7

Comment by Ryan Eberly [ 2023 May 05 ]

I know this is still very much in design and development, but I was thinking about host and hostgroup tree navigation. It would definitely be good to have host/hostgroup filters that are similar to the problems by severity widget, but it might also be useful to have a filter box within the widget for host/hostgroup substring filtering. I was thinking something similar to the functionality of the (In version 6.4) Data Collection -> Host groups page where there is a Name filter box that allows users to enter a substring to filter down the list of host groups. There are some deployments I support where there are thousands of hosts that are all linked to the same templates and the users would greatly benefit from having one single dashboard with no host/hostgroup filters where the list could be filtered down with substrings of key terms.

 

Again...this is just a thought that I think would enhance the user experience.

Comment by Ryan Eberly [ 2023 May 06 ]

I think we also need the ability for the time picker to affect the behavior of top hosts (and top items when available). This should be an optional setting as it's still useful to set static aggregation windows

Comment by Leonardo Savoini [ 2023 Aug 30 ]

I didn't read all comments, maybe you already mentioned. But as a user of PowerBI I found that should be amazing to have a feature were you could click on a "host" and the rest of the widgets (graphs, logs, items value) filters their display just to that host

Comment by Ryan Eberly [ 2023 Aug 31 ]

zingaya - yes I think you have the right idea. Personally, I am envisioning that we'll have the ability to create widgets with item pattern, list or tag filters but with the host, host groups or host patterns omitted and there'll be a host group and host drop down menu ( maybe in that wide open space on the top of every dashboard when the time period selector is available ) where we can navigate through different groups to select one group, one host or many groups or many hosts to dynamically change the data displayed in the widget, whether that's a graph, data overview, top hosts, top items (when available), etc. That's the gist of the commentary above. I think alexei had a great idea here and something my users are looking for. As you may have seen there are some plans for a host and item tree navigation widget on the road map, and this widget I estimate will fit in nicely with what I think will really elevate the user experience in Zabbix. The trigger framework is already remarkable and adding in modern visualization techniques is really going to make Zabbix awesome for many use cases.

Of course I don't have much insight into the work they're doing. I'm just anxiously waiting like you are 😁

Comment by Andrejs Verza [ 2023 Sep 27 ]

Implemented in 7.0.0alpha5 (master) af4828fb628, b3de69215b8, 4e3e95402c3, 9ec05184c52, b95b5b45b06

Comment by Arturs Dancis [ 2023 Oct 24 ]

Documentation (7.0) updated:

  • Configuration > Visualization > Graphs > Simple graphs (moved Time period selector section to a new page)
  • Web interface > Frontend sections > Time period selector

Developer Center:

  • Modules > Widgets > Configuration (updated WidgetForm.php and widget.edit.php examples, list of CWidgetFormView class methods, and list of CWidgetField classes)
  • Modules > Widgets > Presentation (updated JS method onResize() and hasPadding() examples)
  • Modules > Tutorials > Create a widget (tutorial) (updated multiple instructions and widget ZIP file)
Comment by Ryan Eberly [ 2024 Jan 19 ]

As this framework evolves will it be possible to get some documentation added to the developer center for how to handle overridden hosts and items? I just want to make sure that those of us doing widget modules will have some insight into how to use another widget to control a custom widget module.

Comment by Andrejs Verza [ 2024 Jan 19 ]

Hi, GRyan337! Documenting these new features is already in our plans. The communication framework was intended to be as easily usable as possible, and that way it was implemented. You just mention in the manifest.json file which field you're willing to allow to receive data from other widgets or the dashboard itself, and will work automatically. The same if you wanted your widget to act as data source, in which case you just call a single method.

Comment by Ryan Eberly [ 2024 Jan 19 ]

averza - Thanks. That sounds very simple! The reason I asked was because I didn't see anything regarding the current options for the time period selector in certain widgets. In the current Alpha release there didn't appear to be a way to select a compatible widget to control the time. The option is there, but I wasn't sure what a "compatible" widget would be. But, if this is still in development, particularly compatible widgets for selecting/overridding hosts or items, and updates/documentation are in progress/planned, then that's all I needed to hear. 

Comment by Ryan Eberly [ 2024 Oct 26 ]

averza or alexei - Do you think that the framework could be expanded in the future to allow for even more complex use cases? One example could be with switch interfaces. Commonly we use about 4 metrics from each switch port: input rate, output rate, discards and errors. Right now I would have to click 4 different items in the item navigator widget to display each one. Meaning, to visualize all 4 metrics about one switch port is a sequential procedure. But, these 4 metrics all have something in common: either a tag like "interface:eth1/1" or an LLD macro that is substituted with the real interface (eth1/1). I could see it being very useful to be able to define a query in widgets that could make use of tag names and values or the LLD macro as a variable. Then, a widget could exist that shows the interfaces in a list and when you click the interface (I e. eth1/1) it would broadcast that  string to the listening widgets. Right now broadcasting appears limited to IDs like itemids, hostids, and groupids. The ability to filter based on tag name:value already exists in the Latest data page so I think something like this should be possible in global dashboards as the next steps in expanding on the communication framework. This will also allow for making even more customized views of the data.

 

What are your thoughts? Create a new feature request and is this something that the Zabbix team has discussed?

Comment by Alexei Vladishev [ 2024 Oct 28 ]

GRyan337 , The framework already supports sending of arbitrary data., which may also include tags. I think that the functionality you have described is just a matter of extending existing widgets like "Item navigator" to allow selection of an item group (if grouped by tag value), so that it would emit a whole list of items of the selected group to another widget like Graph widget.

Comment by patrik uytterhoeven [ 2024 Oct 28 ]

This would be a nice functionality to add to the widgets I think 

Comment by Ryan Eberly [ 2024 Oct 30 ]

alexei - Ok, I Wasn't sure. I have looked through some of the framework, but not in detail. I see this is still "In documenting". Is more detailed documentation coming soon to the manual for how to use the improvements that were made in 7.0?

 

Comment by Andrejs Verza [ 2024 Oct 30 ]

Hi, GRyan337! The documentation for widget development and communication is still being written. It will cover all aspects of widget development, including the commnunication and even non-technical questions. So - when done - it will be very usable for developers.

Generated at Sat Mar 29 16:24:09 EET 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.