Changing variable names (in JSON model) not working on Grafana 10.2.3

What Grafana version and what operating system are you using?
Grafana 10.2.3 running in Docker container (image: grafana/grafana-oss:latest)

What are you trying to achieve?
I would like to change displayed variable names on a Dashboard. Here are the variables:

And here they are shown as filters on the Dashboard:

I want to display the ports and radios with the following names:

  • eth0 → LAN 1
  • eth1 → LAN 2
  • eth2 → WAN 1
  • eth3 → WAN 2
  • rai0 → Niartherum Home AP
  • rai2 → Niartherum Guest AP

How are you trying to achieve it?
I then go to the JSON Model, and try to change the display names (the “text” fields), as follows:

Before change:

After change:

What happened?
When I click “Save change”, NOTHING happens - it switches back to this:

And this:

What did you expect to happen?
I would expect that changing the text values actually worked, that you could save it, and it would change the display names on the Dashboard. This has worked on previous versions of Grafana.

Final note
I think it’s difficult enough (since you have to go into JSON mode) to change the display text of variables. It would be even more difficult if I had to export my Dashboards, make the changes by hand, and then import them again (although I guess it would be possible).

Please consider making it much more easy to change display values of variables, preferably by some GUI option in the Variables menu.

Use the key : value method




Thank you - works fine. And thanks for also making it easier then to assign keys, so you don’t have to go into JSON mode. :+1:

1 Like

also if you have these values in a database or a csv file, you don’t need to come in an change variables everytime.

Architect things as if tomorrow you will have 1000 ports, 1000 s_ports, 1000 radios etc.
You would not type those would you?