Display name for Dashboard Variables vs actual values

Hi, I am setting up some Read Only dashboards for customers for their data, and I want them to be able to choose from a bucket that has recent, full res data and one thats been downsampled for long term historical data. But rather than show them choices of “telegraf” or “telegraf_downsample10” (which are the bucket names) I want them to see in the list “recent” and “historical” which when they select, I then query from those influxdb 2.x data sources. What is the best way to do this in grafana ?

Hello

Why not name them properly in the first place? If you have no control over that are you using

buckets()

to get the buckets?

You could try this but it would be manual

create buckets variable as Custom and add these key value pairs(spacing is critical as is)
key is what is displayed to Customer, value is hidden and used for filtering

Recent : telegraf_downsample10, Archive : Telegraf

Comes out as

image

from(bucket:"${buckets}")
|> range(start: -1h)
1 Like

perfect, thats exactly what I was looking for!!

1 Like

works but I don’t like it because it does not account for new buckets that might come online. then you have to go in and change it. What would be cool was if grafana provided an aliasing mechanism for buckets.

Internally its fine for us to dynamically fill the selection menu, but for customer graphs I feel I want to keep a level of opacity I guess. Aliases would be nice for sure

1 Like