When you write an alert rule expression like this:

expr: foo > 200

it's just a single promQL query.  Starting with the universe of timeseries 
available, prometheus filters them down to just those where the metric name 
is "foo" and the value is > 200.  So the result of the query is something 
like this:

foo{instance="bar"} 234
foo{instance="baz"} 911

That's what alertmanager receives from the query.  So it can tell you the 
current value, but the "threshold" doesn't exist as such. When you write 
more complex expressions, which match against multiple metrics and multiple 
conditions, you can see there's no single threshold anyway.

What you *can* do is to put your thresholds into a different timeseries.  
See this article:
https://www.robustperception.io/using-time-series-as-alert-thresholds

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/c40121b6-99b0-421e-ba4b-628ed074c91e%40googlegroups.com.

Reply via email to