Hi, I’m on Grafana version 10.3.3, and I have a panel where i have around 10 queries. I’d like to have as an output two different series, one being the sum of queries from 1 to 5, and the other being the sum of queries from 6 to 10.
I’ve already accomplished the first series, by using the “Add field from calculation” Transformation. I can’t do the same adding another transformation “Add field from calculation” because in the Operation field i don’t have all the queries as i have in the first transformation, but just the total of the first transformation. I can’t use the filter option cause it let me select only one query per time
Moreover it doesn’t create a new series, but it adds all on the only series it shows in the panel.
I’ve looked in the forum but couldn’t find what can save my day, anyone willing to help or at least point me in the right direction?
Sounds like you may have run into some limitations with the Grafana transformations. If they are indeed limitations, could you instead do the sum of queries 1-5 in your actual query (vs in Grafana)? What is your datasource and can you share the queries?
thanks for your time. My datasource is zabbix, and in my query i just select an item proposed from zabbix (in this case, the incoming and the outgoing traffic of a switch port).
I think i can do the math in zabbix and then just export it, if i can’t find a way to do that in grafana
Let me know if you need more info or if you have ideas to try
In this case I’d prefer to do two queries. Each of them using some regex to aggregate the data of each needed serie (1 to 5 and 6 to 10) on the query directly and use the sumSeries() function from the datasource.
Query A:
/My item number (1|2|3|4|5)/
sumSeries()
Query B:
/My item number (6|7|8|9|10)/
sumSeries()
If the regex couldn’t be done like above, because the item naming complexity, then I’d edit the needed Items to some Tags on Zabbix side like “Grafana:Items1to5” and “Grafana:Items6to10” and filter by the Tag, getting all the items from it. (same sumSeries function from datasource to aggregate).