inconsistency in prometheus rate/increase/deriv/delta calculation #13900
puneets-ampere
started this conversation in
General
Replies: 1 comment
-
Maybe have a look at https://promlabs.com/blog/2021/01/29/how-exactly-does-promql-calculate-rates/ to get an better idea how the extrapolation really works? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi ,
While reviewing Prometheus-related content online, I've come to understand that the rate / deriv is calculated as (v2 - v1) / (t2 - t1), and the increase/delta is simply (v2 - v1).
Now, considering i have 12 data points (of Gauge type) with a scrape interval of 1 minute, if i apply the rate(metric[2m]) / increase(metric[2m]) or deriv/delta functions, i notice some discrepancies in the results.
Here is the example of data points which were collected by prometheus :
in that case if i use rate(metric[2m]), and increase(metric[2m]) , i expected the following:
i tried visualizing the stored raw data , rate (2m) , increase(2m) , deriv, delta through the prometheus UI:
for point p5,p6 i expected a rate of 0.0833 and an increase of 10, but Prometheus displayed 0.16 and 20 respectively. Could you please share some insights into why prometheus could display 0.16 as rate/deriv and 20 as delta/increase ?
Regards,
P
Beta Was this translation helpful? Give feedback.
All reactions