Prometheus and PromQL 3 · Rates and aggregation

Error ratio

The share of requests that fail, from two aggregated rates.

sum(rate(http_requests_total{status=~"5.."}[5m])) / sum(rate(http_requests_total[5m]))

Official Prometheus and PromQL 3 documentation

More rates and aggregation commands

All rates and aggregation commands · Prometheus and PromQL 3 cheatsheet

Was this page helpful?