1. SLOs #
Objective, error budget and burn rate.
The concepts #
| Indicator | Definition |
|---|---|
| SLI | good requests / total requests over the period |
| Error budget | 100% − objective; 99.9% over 28 days = 40.3 minutes |
| Remaining budget | 1 − (error rate over the period / budget) |
| Burn rate | error rate over a window / budget; 1 = budget used up exactly at period end |
Creating an SLO #
Alerting & IRM → SLO screen: two PromQL queries containing $window (replaced by 5m, 1h, 28d…), an objective (e.g. 99.9), a rolling period (7, 14, 28, 30 or 90 days) and a service, added as the service_name label. Templates exist for HTTP availability, HTTP latency and blackbox probes.
# Good requests
sum(rate(http_server_request_duration_seconds_count{service_name="checkout", http_response_status_code!~"5.."}[$window]))
# Total requests
sum(rate(http_server_request_duration_seconds_count{service_name="checkout"}[$window]))States shown: Compliant, Low budget (under 25% left), Fast burn (1 h burn rate ≥ 6), Objective missed (budget exhausted).
Burn-rate alerts #
| Windows | Burn rate | Severity | Meaning |
|---|---|---|---|
| 1 h and 5 min | 14.4 | critical | 2% of the budget in 1 h |
| 6 h and 30 min | 6 | critical | 5% of the budget in 6 h |
| 1 d and 2 h | 3 | warning | 10% of the budget in 1 day |
| 3 d and 6 h | 1 | warning | 10% of the budget in 3 days |
Observa generates these four rules (the multiwindow, multi-burn-rate method from the Google SRE Workbook) in the slo folder, with the slo, slo_uid, burn_window and source="observa-slo" labels. They are regenerated whenever the SLO changes.
Best practice : The double window (long and short) avoids two traps: alerting on a brief spike that is already over, and keeping on alerting long after things are back to normal.
My progress
Sign in to track your progress and take notes. Sign in
💬 Questions about this lesson
No questions yet: be the first to ask for help or share your configuration.
Recommended Articles
Alerting on error budget burn rate (multi-window burn rate)
Why alert on burn rate rather than a threshold, and how to build the multi-window, multi-burn-rat...
SLOs in Dynatrace: objectives, error budget and burn rate
SLI, SLO and SLA, error budget and burn rate: defining an availability or performance SLO in Dyna...
SRE best practices: useful SLOs and respected budgets
Checklist for setting up SLOs that matter: choosing user journeys, realistic objectives, budget p...
The error budget: making decisions with SLOs
Calculate and track an error budget, write an error budget policy and use it to arbitrate between...
Observability, SRE and incident management for DevOps teams
Operate what you ship: metrics, logs and traces, golden signals, SLIs, SLOs and error budgets, ac...
Grafana IRM: on-call and incidents in Grafana Cloud
Grafana IRM in Grafana Cloud: on-call (OnCall) and incident management (Incident) combined. Alert...
Time-based vs event-based SLO: understanding, computing and choosing (with the Qonto example)
Differences between time-based SLOs (time slices, uptime) and event-based SLOs (good events over ...
Generating Prometheus SLOs with Sloth
Describe an SLO in a few lines with Sloth and automatically generate multi-window recording rules...
Alerts, service levels and incidents in New Relic
Setting up useful alerting in New Relic: policies and NRQL conditions, static and anomaly thresho...