Grafana chained variables as map<string,list>

Using Grafana 11.6.2 and I’m trying to get a chained/nested variable as map<string,list> (e.g. logindex1: [filter1, filter2], logindex2: [filter3]). So that I can have a row repeated by logindex (so far working fine), with one panel per filter. I tried different variants of chained variables, but so far no success. The closest I got was

  1. custom variable per logindex $FiltersForLogindex1 with value filter1, filter2, $FiltersForLogindex2with value filter3
  2. custom variable $LogSources with value logindex1: $FiltersForLogindex1 , logindex2 : $FiltersForLogindex2
  3. create a row and repeat for $LogSources→ works fine, I can see logindex1 and logindex2 by acessing ${LogSources:text}
  4. inside the row I created a text panel to see the value of ${LogSources:value}

Here I would have expected to see a list filter1, filter2 or filter3 (depending on the current row). But instead I see {filter1 for logindex1. Also in the preview for $LogSources I can see that it showslogindex1, filter2}, logindex2.

I’m not bound to this approach, but I’d like to configure the filters per logindex as a variable, not hardcoded. Any advice?

Mind the Gap

logindex1 : $FiltersForLogindex1 , logindex2 : $FiltersForLogindex2

1 Like

Thanks for the quick response. However for me the space is present, but it doesn’t work.
Could you show me your config of $FiltersForLogindex1? Also: What did you use to display the filters as radio buttons?

After some more trial-and-error I discovered that the issue goes away when I configure $FiltersForLogindex1 without the “Include All option” (which I need however and which seems enabled in your case). If this option is enabled however the preview for $LogSources looks like this

1 Like

@yosiasz: Mine is not the solution, it doesn’t work. Could you show your configuration of $FiltersForLogindex1? Also: What did you use to display the filters as radio buttons?

I am using Business Variable plugin