Reputation: 463
I have a InfluxDB dataseries. It stores one information about mulitple machines. I distingsh between these machines with a tag. I can display the information for all three machines at once using a "Group by tag(machine)" clause. the name of the legends is "table.derivative {machine: 1}", "table.derivative {machine: 2}" and so on. How can I change it to "machine 1", "machine 2" and so on?
So far I came across this suggesting to use $groupby (or $g ?), but both are just added a literally.
Upvotes: 25
Views: 44552
Reputation: 1265
If you are using InfluxDB with Flux query language, use the following in the Display Name
or in some cases this might work
Upvotes: 11
Reputation: 7969
In Grafana, you can use alias patterns. There is a description of alias patterns at the bottom of the metrics tab:
In your case, in the Alias By
field you would write $tag_machine
.
Here is an InfluxDb example on the Grafana demo site that uses the Alias By
field:
https://play.grafana.org/d/000000002/influxdb-templated?editPanel=1&orgId=1
Upvotes: 49
Reputation: 7997
For me $_tag_TAGNAME
worked ... none of the above worked for me ( even though I saw it in the help section of my instance of Grafana ...)
Upvotes: 1