Variable Names and Values

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

Grafana v10.4.1 (d3ce857c0e) on Windows

  • What are you trying to achieve?

I want to use Variables for my dashboard.

  • How are you trying to achieve it?

I added an new variable, type custom and the options like this:

Machine01 : 1, Machine02 : 2, Machine03 : 2

  • What happened?

I have 2 fields with the same value, and when I change the variable with the selector on the top of the dashboard, it will not change. For example: I have selected Maschine02, and want to select Machine03. It does not update “$VariableName:Name”

  • What did you expect to happen?

I expected “$VariableName:Name” to change

  • Can you copy/paste the configuration(s) that you are having problems with?

If needed

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

No

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

Documentation for Variables: Variables | Grafana documentation

Why you are using that :Name format? How did you named variable? Where did you use that $VariableName:Name?

You can change variable to Machine01 and then change it to Machine03. It is not changing from Machine02 to Machine03 because the value is the same.

Why do you need two different labels with the same value? May be it’s better to update query somehow?

I use the same values for different names, because the number is not the machine number, but for a machine group. I did a few tests, and the best way could be to make an database table with an sort of lookup and use an query for the variable field, or just join it in my data-query.

Thank you!

Where should I file the bug?