I have a custom variable I am using as a filter for my dashboard. I use this as a parameter to my queries in order to incdicate healthy or unhealthy status:
azure_metric_loadbalancer_heartbeat{subscriptionID=~"$sub"}$status
However, I would like to change the display name of the numbers to the words "unhealthy", "healthy", "all" so it is easier to understand for non technical users while maintaining its functionality on the query.
I was thinking of using another Custom variable with the display name Healthy, Unhealthy, all and map out the value of status from that
Something like this
health = "Healthy|Unhealthy|All"
If $health="Healthy" then $status=">0"
If $health="Unhealthy" then $status="<1"
If $health="All" then $status="<2"
Is it possible to do this?
You can do it by putting values of your variable in format label : value
.
In your exact case it would be healthy : >0, unhealthy : <1, all : <2
Online demo of similar variable can be seen here.