Why irate from Prometheus doesn't capture spikes

Spikes and irate

v  20     50     100     200     201      230   
----x-+----x------x-------x-------x--+-----x-----
t 10 | 20 30 40 50 | 60
| <-- range=40s --> |
^
t
  • (100–50) / (30–20) = 5 rps
  • (200–100) / (40–30) = 10 rps
irate(requests_total[25m]), step=20m
irate(requests_total[25m]), step=21m
green line — rate(requests_total[25m]), step=20m
green line — rate(requests_total[25m]), step=21m

Capturing spikes

rollup_rate(requests_count), step=21m, without rollup=”max”
rollup_rate(requests_count), step=21m, with rollup=”max”

Conclusion

--

--

--

Founder and core developer at VictoriaMetrics

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Is there a better programming language to learn?

Metaprogramming in Ruby

Universal Data Connectivity with CData

Launching an APP: Automation through Jenkins

The power of Jenkins and Kubernetes

Over 40 Years in IT

Docker Compose Redis

Express vs Flask: A Comparison of Speed

How to make a Mega Menu using Bootstrap 4

screenshot of the welcm.uk website showing home page with mega menu

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Aliaksandr Valialkin

Aliaksandr Valialkin

Founder and core developer at VictoriaMetrics

More from Medium

Longhorn Storage for High Availability of Prometheus pods on Kubernetes

A step-by-step guide to implement metrics for your ad-hoc Operator in Golang by Prometheus on…

Demystifying the Life of a Kubernetes Network Packet with Calico

Kubernetes DNS caching gone wrong