I want dome devices connected to a Grafana dashboard. Each device has a name. I wanted to "attatch" an IP to each device, but I can't modify the database, so I figured I could use custom variables.
The name of the device is saved on the "name" variable and I used a key/value custom variable called "list" with the name of the device as the key, and the IP as the value, like this:
DEVICE 1 : 192.168.0.26, DEVICE 2 : 192.168.0.27
Now I want to display the correct IP when the user select the name of the device but I haven't figured out the right way to do it.
I've tried the following:
- Use the "Repeat by variable option" in the panel where I want to display the IP in, and select the variable "name".
- Tried to access the value using this sintax:
${list[name]}
and${list.${name}}
- Using this sintax
${list.name}
seems to work, but it only displays the first value.
I can't make it happened. Please help me with the right sintax or the right way to do this.