Write the fast-burn page alert for a 99.9% SLO in Prometheus.
AdvancedConceptError Budgets & Burn-Rate Alerting
Answer
- alert: CheckoutErrorBudgetBurnFast
expr: |
(
slo:sli_error:ratio_rate1h{slo="checkout-availability"} > (14.4 * 0.001)
and
slo:sli_error:ratio_rate5m{slo="checkout-availability"} > (14.4 * 0.001)
)
or
(
slo:sli_error:ratio_rate6h{slo="checkout-availability"} > (6 * 0.001)
and
slo:sli_error:ratio_rate30m{slo="checkout-availability"} > (6 * 0.001)
)
for: 2m
labels:
severity: page
annotations:
summary: "Checkout is burning its 30d error budget fast"
runbook_url: "https://runbooks.example.com/checkout/slo-burn"
The or combines both paging tiers into one alert; many teams keep them as two named alerts instead, to show which tier fired.
More on Error Budgets & Burn-Rate Alerting
What is an error budget and how do you calculate it?BeginnerWhat is an error-budget policy?BeginnerWhat happens when the error budget is exhausted? Is it a punishment?IntermediateWhat should you do if the error budget is never spent?IntermediateWhat is burn rate?IntermediateHow much budget does an alert at burn rate B over window W consume?Advanced