79503058

Date: 2025-03-12 08:56:39
Score: 0.5
Natty:
Report link

The problem is that sum_over_time returns a single value which is the total sum of all data points in the interval, whereas what you want is - for each timestamp - the sum up to that timestamp. That is unfortunately not possible in Prometheus alone.

But Grafana has support for that using an "Add field from calculation" transformation using "Cumulative functions" as mode . See https://stackoverflow.com/a/79453819/574351

Reasons:
  • Blacklisted phrase (1): stackoverflow
  • No code block (0.5):
  • High reputation (-1):
Posted by: Nicola Ambrosetti