No.  Perhaps I didn't explain it very clearly:

- alerts are PromQL expressions, just the same as those you draw graphs of
- when the PromQL expression returns a value (*any* value) it sends an 
alert for that metric + set of labels
- when the PromQL expression no longer returns a value for that metric + 
set of labels, a resolution is sent.

That's it.  There is no separate "resolution" condition.  Resolution = 
alert no longer exists.

There is no way to distinguish "the metric which generated the alert has 
vanished" from "the metric which generated the alert still exists but its 
value no longer matches the expression", because the expression is a 
filter: if the value no longer matches the filter, the value vanishes.

In prometheus, operators like "<" do not work like normal programming 
languages.  They are *not* boolean operators.  Rather, they apply a filter 
to the set of values in an instance vector..

Try going into PromQL and drawing a graph like "node_load1 > 1".  You'll 
see values where the condition is true, and gaps where the condition is 
false:

[image: img1.png]


This is exactly how alerting works.  A PromQL expression with *any* value 
generates an alert.  If no value is present, that's the resolution of the 
alert.  Alertmanager has no way of knowing the *reason* why the value no 
longer appears in the result set of the alerting expression.

-- 
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/8d1427c1-4de9-4a09-8bf4-bfb9f360426e%40googlegroups.com.

Reply via email to