Dashboard Variables with value labels

  • What Grafana version and what operating system are you using?
    v9.1.1

  • What are you trying to achieve?
    Define an Alias/Label for my Dashboard Variable Dropdown

  • How are you trying to achieve it?
    Simply add an Dashboard variable via GUI and add my Query that populate my label and value:

import "array"
import "join"
import "influxdata/influxdb/schema"

left = schema.tagValues(bucket: "foobar", tag: "ip")
right =
    array.from(
        rows: [
            {ip: "10.1.1.2", name: "Foobar 2"},
            {ip: "10.1.1.6", name: "Foobar 6"},
            {ip: "10.1.1.1", name: "Foobar 1"}
//            ...
        ],
    )

join.left(
    left: left,
    right: right,
    on: (l, r) => l._value == r.ip,
    as: (l, r) => ({name: r.name, ip: l._value}),
)
  • What happened?
    In some variation i get the name as variable dropdown and also as query variable ${myVar}.

  • What did you expect to happen?
    that the name is used for the dropdown and the ip as query variable in my dashboard-widgets with a influx source.