sum(foo)
sum(foo[5m])
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/3f5d5205-5f82-446f-8abe-4a4a4e396e7a%40googlegroups.com.
You can use sum_over_time(foo[5m]) to add up all the values in a metric over time.
On Wed, Jan 3, 2018 at 6:59 PM, Dave Cadwallader <dcadwa...@gmail.com> wrote:
Just realized that sum(foo) doesn't give me the sum of all values since the beginning of time, but only the most recent value. So I think I have a misunderstanding about how sum works.
On Wednesday, January 3, 2018 at 10:55:08 AM UTC-7, Dave Cadwallader wrote:Let's say I have a gauge called "foo". I can get the sum of all values of foo since the beginning of time using:sum(foo)But let's say I want to get the sum of all values of foo, from the past 5 min. I tried:sum(foo[5m])...but I got an error: "expected type instant vector in aggregation expression, got range vector"Is there a way to sum across a range vector, or a different approach to achieve my goal?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 prometheus-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.