Dropdown variable from InfluxQL tags

  • What Grafana version and what operating system are you using?
    Grafana Cloud

  • What are you trying to achieve?
    I want to create a dropdown variable at the top of the dashboard, showing tag values from a measurement in InfluxDB.

  • How are you trying to achieve it?
    I made a variable with type: query and set the query to: SHOW TAG VALUES ON "example-db" WITH KEY = "site"

  • What happened?
    The variable is empty, no values can be selected.
    image

  • What did you expect to happen?
    I expected to see a list of tags, similar to what this query returns in the Explore page.

Documentation here: Explore your schema using InfluxQL | InfluxDB OSS v1 Documentation

Maybe look into

${var1:text} to access a key and ${var1:value} to access value