Making a Grafana dashboard to view the performance of our application and it deployed in the various regions (not all regions). My dropdown variable(location) has all the region data so it'll substitute in my query and shows the result.
I'm using the following query
sum(rate(container_cpu_usage_seconds_total{aws_cloudformation_stack_name=~".*Blue.*",cloud=~"${cloud}",environment=~"${environment}",location=~"${location}",name=~"ecs-gu-task-definition.*"}[1m])) by (instance_id,instance_ip)
Added legend as "${location}-{{instance_ip}}". So, If I select the specific location then my result looks like
use1-10.5.134.23 0.676%
euw1-10.5.134.56 23.87%
The problem is if I select location as ALL then it's showing all the location data in all the result values.
{use1,euw1}-10.5.134.23 0.676%
{use1,euw1}-10.5.134.56 23.87%
How to show the exact location value in the result?