Creating template variables with flux

Hi,

Can anyone provide me with a little guidance on how to create template variables using a flux source? I am running Grafana 7.3 and Influx 2.0.

Hello,

You have to create your own variable in dashboard’s settings. You probably struggle with influxdb 2, you have one way to request tags:

import "influxdata/influxdb/schema"

schema.tagValues(
  bucket: "bucketName",
  tag: "tagName"
)

Others ways return only one row.

If you are used to influx 1 I advice to stay on it and get ride of influxdb for long term.

Best regards

Unfortunately I upgraded Influx to 2.03 OSS which doesn’t play nicely with Grafana right now. I was able to get it to work eventually with a query. The problem was I had to combine my measurement and field filters for it to work for some reason.