Variable with Text and Value bug (I assumed)

  • What Grafana version and what operating system are you using?
    Grafana 9.0.5, with RHEL 8

  • What are you trying to achieve?

I want to use the Variable using text and value as per Filter variables with regex | Grafana documentation
I want to use the text instead of the value.
The datasource is Prometheus

  • How are you trying to achieve it?

Instead of showing the value, I need the text of the result of the variable

  • What happened?
    The result of the variable are all the text and values.
    Both of them shown in the result…
    I use snmp exporter to get the ifAlias as text instead of ifName values

  • What did you expect to happen?
    Just the text of ifAlias shown and use in the panel variable.

  • Can you copy/paste the configuration(s) that you are having problems with?
    Below my variable:
    Query: query_result(sort(ifIndex{instance="$instance"} ) )
    Regex: /ifIndex{ifAlias="(?<text>.*)",ifDescr|ifName="(?<value>.*)",instance/g
    That regex is following the URL above in Grafana Documentation.

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    Not at all

  • Did you follow any online instructions? If so, what is the URL?

Is it a bug or expected behavior if the datasource is Prometheus?

Fadjar Tandabawana

If you want grafana to use the text only then dont provide it key: value, just provide it key