Yes, you can combine subqueries <https://prometheus.io/blog/2019/01/28/subquery-support/>, the count aggregator <https://prometheus.io/docs/prometheus/latest/querying/operators/#aggregation-operators>, and the avg_over_time function <https://prometheus.io/docs/prometheus/latest/querying/functions/#aggregation_over_time> like so:
avg_over_time(count(kube_pod_info)[10m:]) /MR On Tue, Sep 1, 2020 at 7:27 PM vineka s <[email protected]> wrote: > Hi , > Is there any way we can get the avg of the count of a metric for a period > of time.? > > Thanks! > > -- > 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/dce6117b-c7d7-4222-aeb7-9b06383fb308o%40googlegroups.com > . > -- 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/CAMV%3D_gaWMHQyNdhpvrOx3kAnzQ2uVzmW9g4PMdU5B0vtPRvOGw%40mail.gmail.com.

