The PromQL Patterns Checklist Every SRE Should Know
Twelve PromQL patterns that cover 80% of production queries. The checklist with examples and what each catches.
Rate and increase
rate() over a window for per-second rates. Baseline pattern; everything else builds on it.
increase() for total over a window. Useful for counters; misleading for gauges.
Histogram quantiles
histogram_quantile(0.99, rate(metric_bucket[5m])). The standard p99 query.
Watch for low-cardinality buckets that miss your tail. Re-bucket if p99 always rounds up to the bucket boundary.
Predict and threshold
predict_linear() for capacity forecasting. 'Will the disk fill in 4 hours?'
Threshold matching with comparison operators. Foundational for alert rules.