0

Is there a way to define a toggle variable that holds sets of variables?

eg a region switch that would have:

  • 'Europe': {ip: 'europe_ip', port: 'europe_port', service_name: 'europe_service_name'}
  • 'America': {ip: 'america_ip', port: 'america_host', service_name: 'america_service_name'}
  • 'Asia': {ip: 'asia_ip', port: 'asia_host', service_name: 'asia_service_name'}

where you'd have a dropdown for region with Europe, America, Asia at the top of the dashboard and then refer to these variable as $region.ip, $region.service_name etc

I can't figure out how to do it, even using Custom variables

EDIT: I need to be able to define these variables manually. Not pull them from some data source

3
  • AFAIK, nothing like this is supported. But you can define region as usual, and the define all dependent variables using chaining.
    – markalex
    Commented Dec 3 at 7:35
  • Right, I saw this post but the "Easier" way doesn't really do this, and the "More agile" one only works off of some data source. I was hoping to be able to do this directly from Grafana. Thanks though
    – Will1v
    Commented Dec 3 at 13:49
  • Yeah, this is not a proper solution, but rather a workaround(
    – markalex
    Commented Dec 3 at 15:19

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.