I have a simple problem but I can’t seem to get over with.
I’m trying to group my data by service name, then count how many in each service.
from(bucket: “xxxs”)
|> range(start: -30m, stop: now())
|> group(columns: [“service”], mode:“by”)
|> aggregateWindow(every: 1h, fn: count, createEmpty: false)
|> sort(columns: [“value”])
So the result is like:
table0 timestamp ServiceA 10
table1 timestamp ServiceB 23
table2 timestamp ServiceC 5
What I like to do is sort “tables” by the value inside tables so it looks like:
table1 timestamp ServiceB 23
table0 timestamp ServiceA 10
table2 timestamp ServiceC 5
I understand I can use “group()” to merge them into one table then sort but I’d like to keep them in different tables for Grafana bar gauge display. I simply can’t find a way to change the order of tables.
Any hint would be appreciated!
Thanks.