Cascading Drop Downs

Hi All,

first post here, apologies if its in the wrong place.

I am trying to get to grips with variables I’m using Thanos for Prometheus and have multiple regions setup using external labels.

I would like to filter results in my variables to display instances tied to the region - ala cascading menus in my dashboards.

I have had a play trying to get this work based off other examples but struggling so seeking your advice.

Example output from Prometheus to aid discussion.

up{instance=“Server1.domain .co.uk”,job=“RC - App”,region=“eu-west-2”} 1
up{instance=“server1.domain .de”,job=“AWS (Windows) - eu-central-1”,region=“eu-central-1”} 1
up{instance=“server2.domain .de”,job=“AWS (Linux) - eu-central-1”,region=“eu-central-1”} 1
up{instance=“server3.domain .de”,job=“AWS (Linux) - eu-central-1”,region=“eu-central-1”} 1

$region variable:

label_values(wmi_system_system_up_time, region)

$server variable:

label_values($region,wmi_system_system_up_time, instance)

I get the error;

Templating
Template variables could not be initialized: parse error at char 3: could not parse remaining input “-central-1,wmi_”…

Would appreciate some help getting on the right track :slight_smile: Thankyou!

Pete

anyone available to comment? :slight_smile:

I’m looking for cascading drop downs as well for filtering in grafana custom dashboards. Any ideas?