Stack data with Bar Chart visualization and Zabbix datasource

  • What Grafana version and what operating system are you using?
    Grafana v10.4.2 on Ubuntu

  • What are you trying to achieve?
    I’m monitoring some nodes and their running services on Zabbix. I’m receiving data like:

Node01: service1 - 2
Node01: service2 - 1
Node01: service3 - 45
Node02: service1 - 3
Node02: service2 - 8

etc... 

I have almost 80 nodes, so I thought that the best visualization would be a vertical bar chart stacked per node, like this: https://archive.smashing.media/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/d135f39a-7d15-458c-a58d-cc35e304f9d4/9-stacked-bar-chart-final-large-opt.png

  • What happened?
    I tried a lot of transformations and enabled the “Stacking” option to “Normal” on panel, but I could not get exactly what I need.

  • What did you expect to happen?
    I expected to have one bar for each node, with the services stacked vertically.

Is this possible?

If your data is that the every Node is a Host and every Service is an Item, you could do this recipe:

Transformations:
1 - Prepare time series: “Multi-frame time series”
2 - Reduce: “Reduce Fields” with Calculations: “Last *”
3 - Labels to fields: Mode: “Columns” with Labels “host” and “item” with “Value field name” on “item”
4 - Merge series/tables

It looks like this:

Non-Stacked:

Stacked:

Hope it helps!

Closing since there’s no updates on the op.