On Sunday, 3 October 2021 at 22:50:59 UTC+1 [email protected] wrote: > Trying to manipulate alerts with absent() tends to behave badly. >
Aside: I found it a bit surprising at first that count() and sum() across an empty instant vector give an empty result, rather than 0. I don't see that behaviour explicitly called out here <https://prometheus.io/docs/prometheus/latest/querying/operators/#aggregation-operators>, but I guess it makes sense when you think about what "count by", "sum by" or "count_values" would have to do, when given no input. You can of course make it work the other way if required: e.g. "count(foo) or vector(0)" -- 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/4adf9702-adbc-43be-837e-794c6e009d2bn%40googlegroups.com.

