Is there a functionality using which we can get the difference in the 
values of counter samples within the time interval, while handling counter 
reset case and excluding the extrapolate functionality?

We tried using the increase() function, but it returns an extrapolated 
result. We have observed that the difference between the actual increase 
and the extrapolated result is considerably high.

*Example:*
If we are calculating the increase in a metric "node_disk_read_bytes_total" 
every 5 mins, with prometheus scrape interval set as 1 min:

   - Consider the following sample values for the metric 
   "node_disk_read_bytes_total" within a 5 mins interval :
   [23758450955264 *(F)*, 23758499419136, 23758518625280, 23758519292928, 
   23758519870464 *(L)*]

*Result of the increase function:*

   - Extrapolated value returned by increase function over 5 mins: 86144000

*Our requirement is a function which:*

   - *Handles the counters resets similar to increase function*
   - *And returns the actual difference b/w the values of the first 
   sample(F) and Last sample(L) within the specified interval : 68915200*

*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/81dcdec0-3adc-417e-9861-73f013ed95den%40googlegroups.com.

Reply via email to