irate()
irate(v range-vector)
calculates the per-second instant rate of increase of the time series in the range vector. This is based on the last two data points. Breaks in monotonicity (such as counter resets due to target restarts) are automatically adjusted for.
The following example expression returns the per-second rate of HTTP requests looking up to 5 minutes back for the two most recent data points, per time series in the range vector:
irate(http_requests_total{job="api-server"}[5m])
irate
should only be used when graphing volatile, fast-moving counters. Use rate
for alerts and slow-moving counters, as brief changes in the rate can reset the FOR
clause and graphs consisting entirely of rare spikes are hard to read.
Hi,Looking at manual for irate() funstion I see==============
irate()
irate(v range-vector)
calculates the per-second instant rate of increase of the time series in the range vector. This is based on the last two data points. Breaks in monotonicity (such as counter resets due to target restarts) are automatically adjusted for.The following example expression returns the per-second rate of HTTP requests looking up to 5 minutes back for the two most recent data points, per time series in the range vector:
irate(http_requests_total{job="api-server"}[5m])
irate
should only be used when graphing volatile, fast-moving counters. Userate
for alerts and slow-moving counters, as brief changes in the rate can reset theFOR
clause and graphs consisting entirely of rare spikes are hard to read.==============This looks confusing. It says it calculate rate in two last data points yet it says it looks up to 5 minutes back.Do I understand correctly these [5m] only make a difference if data points are sparse but if I have capture setup for every 5seconds the irate() over [5m] or [30s] will give the same value ?
This is different from rate() function which would look at the average rate for specified interval so [5m] and [3m] can be significantly different ?Do I miss something ?
--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.