> sum by (instance) (apt_upgrades_pending) > 0
I think that your suggestion will work. I'll try it out for the next days.
Many thanks.
About the other way, for completeness: Instead of using a subquery, I
wonder whether this would work too:
- record: apt_upgrades_pending:sum_grouped_by_instance
expr: sum by ( instance ) ( apt_upgrades_pending )
- alert: AptNotUpdatingPackages
expr: min_over_time( apt_upgrades_pending:sum_grouped_by_instance[7d] )
> 0
for: 0m
labels:
severity: warning
Prometheus seems unable to do a min_over_time() from a sum(). Is that kind
of intermediate step with "record" a generic way to overcome this
limitation? Or have I missed something?
--
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/ef3fe293-674b-4061-ae30-8dd445325c55n%40googlegroups.com.