Grafana alert combining two metrics

Hello,

I wonder how could one create a Grafana alert rule combining two metrics from Prometheus data source. To be more concrete, I have two metrics: celsius(name=…, instance=…) and celsius_threshold(name=…, instance=…).
I would need to launch the alert when celsius >= celsius_threshold and celsius_threshold != 0 matching the same name and instance labels.

Thank you very much for any hint, I’ve been looking for solution for a while…

Maciek

Let’s work on the first part. Can you write two separate queries (A celsius, B celsius_threshold) and then do a math expression C that is A >= B ? For the second can you use a math expression of B != 0?