Fluxql grafana variables

Hi @mckinley ,
grant2 already provide solution for you. You just need to adjust bucket name and tag, so in your case your query for dashboard variable should look like:

import "influxdata/influxdb/schema"
schema.tagValues(
    bucket: "bucket1",
    tag: "agent_host"
)

and all unique agents should be displayed.

You can take a look at influxdb schema tagvalues documentation.

Everything is done in Grafana ( open dashboard → Settings → Variables → New variable ). Nothing will be changed or written in influxdb.

 

Best regards,
ldrascic

1 Like