It’s because the annotation uses $value, so the annotation can report a
more useful number to the user, rather than rate per second.

(Although using increase() rather than rate() may be better for this case,
as it avoids the need to keep the window in sync with the maths.)

David

On Tue, 16 Mar 2021 at 09:31, Unni Sathyarajan <unnisathy...@gmail.com>
wrote:

> Hi All,
>
> Could someone please explain this PromQL query?
>
> rate(kube_pod_container_status_restarts_total{job="kube-state-metrics"}[15m])
> * 60 * 5 > 0
>
> Cannot get my head around why we multiply ** 60 * 5 * in this metric.
>
> Would the following query be fine to identify and alert any crash looping
> containers?
>
> rate(kube_pod_container_status_restarts_total{job="kube-state-metrics"}[15m])
> > 0
>
> This is in reference to the following alert
> https://monitoring.mixins.dev/kubernetes/
>
>
> --
> 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 prometheus-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-users/ddd22d69-2213-4647-87d8-cadd7f7f7211n%40googlegroups.com
> <https://groups.google.com/d/msgid/prometheus-users/ddd22d69-2213-4647-87d8-cadd7f7f7211n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CAP9KPhA7xW4Sdo0n5jhJOMuXak5iJJvkLnxAoWkQ9%2BYQ3n0bJg%40mail.gmail.com.

Reply via email to