Trivially, rate(container_cpu_usage_seconds_total[24h]) will give you the average rate over the preceding 24 hours.
Of course, if you graph this, then it will vary up and down as the 24 hour window is sliding - so you only look at the value at midnight each day. If necessary you can make a recording rule that does this for you. On Thursday, 5 August 2021 at 16:27:49 UTC+1 [email protected] wrote: > Hi, > > I know that we can run rate(container_cpu_usage_seconds_total[5m]) to get > the cpu usage of a container. > > I would like to get the average of this usage over the last day. > however, when trying to add avg_over_time around it, I am getting > parse error: ranges only allowed for vector selectors > > How can I achieve what I need? > > 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/c1606a8c-2604-476e-991d-8779e5c269d6n%40googlegroups.com.

