I have configured data source as Prometheus with Grafana. Prometheus return 3 different Metrics. I want to display the panel based on the below condition
If Metrics 1 condition is true then it should return the Metrics2 value in the panel
If Metrics 1 condition is False then it should return the Metrics3 value in the panel
Kindly help me on this
I am not sure there is an easy way to do what you want unfortunately.
Is it possible to filter based on the metric values?
grafana - Filter prometheus results by metric value, not by label value - Stack Overflow
You could have two queries in one panel, one for Metrics2 and one for Metrics3 and if for example, there are no values for Metrics2 then it would be filtered out.
Example from the play site that filters out series that have value 0: Grafana