I'm making a Grafana dashboard to display the performance of the canary application. My problem is I need to find out which instance is the canary one (blue or green).
Canary stack will always create one instance either blue or green so I can see the count of the instance using the below query but can't make to display the value of the bound metric.
(count(bound(cfstack=".Blue.")) == 1) or ( count(bound(cfstack=".Green.")) == 1)
How can I express the following in PromQL?
if ( count(bound(cfstack=".*Blue.*")) == 1 )
cfstack_val=".*Blue.*"
else
if ( count(bound(cfstack=".*Green.*")) == 1 )
cfstack_val=".*Green.*"
bound(cfstack="${cfstack_val}")