Generate variables’ list depending on another


Sorry for this very basic stupid question :slight_smile:
Im trying to have a variable showing in the description based of the name variable of that panel

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

  • What are you trying to achieve?
    I have two variables based on labels. One is used for the panelname and repeating. Other is used for the tooltip. Based on the name label it need to show the right address label on the description.

  • How are you trying to achieve it?
    Made the variable like;

Set the variable in the description

  • What happened?
    For all the panels it shows the same address.


  • What did you expect to happen?
    It should show the correct matching description based of the names label

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

address variable is evaluated on the dashboard level, not on the panel level.
So when each panel has own name value (because you used repeating), then address is still only static value.

So what I wanted is not possible? Or are there other ways to get something like this.

As always: it depends. Use key:value (e.g. name:address in your case) variable, so key (${var:value}) can be used in the title and value (${var:text}) in the description. But there is no way to generate key:value variable from Prometheus. So it is not possible for your use case, but it will be possible with different TSDB (e.g. MySQL, where you can create key:value variables). Or you can hardcode all key:values, but they won’t be updated automatically.

So it depends, what you tolerate:

  • change used TSDB
  • hardcode values and update dashboard anytime there is new value or some value should be removed
1 Like

Thanks! I will look for another solution :slight_smile: