SLIs, SLOs & Error Budgets

This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production.

Checked on 2026-11-09 against Grafana 13.3.x and Kibana 9.5.x.

Raw threshold alerts answer "is a metric above a number right now"; they say nothing about whether that matters to users over time, and they either page too often or too late. Service level objectives replace that guesswork with a agreed target for the user experience, a budget of allowed failure and an alert that fires in proportion to how fast the budget is being spent. This page explains the vocabulary, the arithmetic and the alerting pattern, then shows how to build it by hand with Prometheus rules and how Grafana SLO and Kibana SLOs automate it. The signals the indicators are built from are on RED, USE & the Golden Signals, and the wider alert design on Designing Actionable Alerts.

SLI, SLO and SLA

  • A service level indicator (SLI) is a measurement of one aspect of the service as users experience it, for example the share of requests answered successfully or the share answered faster than 300 ms.

  • A service level objective (SLO) is a target for that indicator over a period, for example 99.9 percent of requests succeed over 30 days.

  • A service level agreement (SLA) is a contract that attaches consequences, usually financial, to missing a target. The SLA is looser than the internal SLO, so that you notice and fix problems before you owe anything.

The SRE Workbook recommends writing every SLI as a ratio of good events to valid events, giving a value from 0 to 100 percent. A single form makes alerting, reporting and budget tooling uniform. It also separates the SLI specification (the outcome you care about, such as "a book page loads fast enough") from its implementation (how you measure it: server metrics, load balancer logs, synthetic probes or client-side telemetry), which trade accuracy, coverage and cost.

Request-based and window-based SLIs

A request-based SLI counts events: good requests divided by valid requests over the SLO window. It is what the PromQL below computes, and what Kibana calls the occurrences budgeting method (good events divided by total events). A window-based SLI divides time into slices of fixed length and counts the slices in which a condition held, for example "the p95 latency was under 300 ms in 99 percent of one-minute slices". Kibana calls this the timeslices method (good slices divided by total slices), and its timeslice metric SLI type requires it. Request-based SLIs weigh a busy minute more than a quiet one, which matches user impact; window-based SLIs are easier to explain and fit measurements that are not event counts, such as a probe or a saturation gauge, but treat one failing request in a quiet minute the same as an outage in a busy one.

Error budget and burn rate

The error budget is the failure the SLO allows: 100 percent minus the target. A 99.9 percent SLO over 30 days allows 0.1 percent of valid events to be bad, which for time-based availability is about 43 minutes. Expressing the budget as a number of failed events lets you measure how much of it one incident consumed. A target of 100 percent is the wrong target: it is unattainable, blocks all change and leaves no room to improve.

The burn rate says how fast the budget is being spent relative to the SLO. With the observed error ratio over a window and the SLO target as a fraction, the burn rate is

A burn rate of 1 consumes exactly the whole budget by the end of the SLO period; 2 exhausts it in half the period. The error ratio at which an alert should fire for a chosen burn rate is , so for a 99.9 percent SLO a burn rate of 14.4 corresponds to an error ratio of . The share of the whole budget used when an alert fires after a window of length in an SLO period is

Check with a 30-day period (720 hours): a burn rate of 14.4 sustained for 1 hour consumes of the budget, a burn rate of 6 for 6 hours consumes , and a burn rate of 1 for 72 hours consumes .

Source: https://sre.google/workbook/alerting-on-slos/ (the definitions of burn rate, alert threshold and budget consumed).

Multi-window, multi-burn-rate alerts

A single threshold on a single window is either slow (a long window detects a small, steady burn but reacts late and keeps alerting long after recovery) or noisy (a short window pages on blips). The SRE Workbook’s recommended answer pairs a long window, which says the burn is significant, with a short window of one twelfth of its length, which confirms the burn is still happening. Both must exceed the threshold, so the alert resets quickly when the problem stops. Several such pairs cover fast and slow burns:

Severity Long window Short window Burn rate Budget consumed

Page

1 hour

5 minutes

14.4

2%

Page

6 hours

30 minutes

6

5%

Ticket

3 days

6 hours

1

10%

The page-severity rows catch outages and fast degradations within an hour or a few hours; the ticket row catches a slow leak that would otherwise exhaust the budget unnoticed. These numbers are the Workbook’s recommended starting configuration for a 99.9 percent SLO over 30 days; tune them to your own period and tolerance. The Workbook’s example rules also contain a 24-hour and 2-hour pair at burn rate 3, which is not in that starting table.

flowchart TD A["Evaluate error ratio over long and short windows"] --> B{"Long 1h and short 5m both above 14.4 x budget?"} B -- yes --> P1["Page: fast burn, 2% of budget in 1 hour"] B -- no --> C{"Long 6h and short 30m both above 6 x budget?"} C -- yes --> P2["Page: 5% of budget in 6 hours"] C -- no --> D{"Long 3d and short 6h both above 1 x budget?"} D -- yes --> T["Ticket: slow burn, 10% of budget in 3 days"] D -- no --> OK["No alert: budget consumption is acceptable"] P1 --> R["Resolves when the short window drops below the threshold"] P2 --> R T --> R

Source: https://sre.google/workbook/alerting-on-slos/ (the multiwindow, multi-burn-rate section).

Building it by hand with Prometheus

Without a managed SLO product you can implement the pattern with recording rules and one alert rule per severity. Record the error ratio over each window once, then compare the recorded series with the threshold, so the alert expression is cheap and the dashboard can reuse the same series. The Bookshelf availability SLI is the share of non-5xx requests, with a 99.9 percent target.

# slo-bookshelf.rules.yml
groups:
  - name: bookshelf-slo-availability
    rules:
      - record: job:slo_errors_per_request:ratio_rate5m
        expr: |
          sum(rate(http_server_requests_seconds_count{job="bookshelf",status=~"5.."}[5m]))
          / sum(rate(http_server_requests_seconds_count{job="bookshelf"}[5m]))
      - record: job:slo_errors_per_request:ratio_rate30m
        expr: |
          sum(rate(http_server_requests_seconds_count{job="bookshelf",status=~"5.."}[30m]))
          / sum(rate(http_server_requests_seconds_count{job="bookshelf"}[30m]))
      - record: job:slo_errors_per_request:ratio_rate1h
        expr: |
          sum(rate(http_server_requests_seconds_count{job="bookshelf",status=~"5.."}[1h]))
          / sum(rate(http_server_requests_seconds_count{job="bookshelf"}[1h]))
      - record: job:slo_errors_per_request:ratio_rate6h
        expr: |
          sum(rate(http_server_requests_seconds_count{job="bookshelf",status=~"5.."}[6h]))
          / sum(rate(http_server_requests_seconds_count{job="bookshelf"}[6h]))
      - record: job:slo_errors_per_request:ratio_rate3d
        expr: |
          sum(rate(http_server_requests_seconds_count{job="bookshelf",status=~"5.."}[3d]))
          / sum(rate(http_server_requests_seconds_count{job="bookshelf"}[3d]))

  - name: bookshelf-slo-burn-rate
    rules:
      - alert: BookshelfErrorBudgetBurnPage
        expr: |
          (
            job:slo_errors_per_request:ratio_rate1h > (14.4 * 0.001)
            and job:slo_errors_per_request:ratio_rate5m > (14.4 * 0.001)
          )
          or
          (
            job:slo_errors_per_request:ratio_rate6h > (6 * 0.001)
            and job:slo_errors_per_request:ratio_rate30m > (6 * 0.001)
          )
        labels:
          severity: page
          service: bookshelf
        annotations:
          summary: "Bookshelf is burning its 99.9% availability error budget too fast"
      - alert: BookshelfErrorBudgetBurnTicket
        expr: |
          job:slo_errors_per_request:ratio_rate3d > 0.001
          and job:slo_errors_per_request:ratio_rate6h > 0.001
        labels:
          severity: ticket
          service: bookshelf
        annotations:
          summary: "Bookshelf is slowly exhausting its 99.9% availability error budget"

Source: https://sre.google/workbook/alerting-on-slos/ (the recording and alerting rule structure and the recording-rule naming come from its example) and https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/. The metric and label names are the Bookshelf’s Micrometer names. A 3-day rate() over high-cardinality series is expensive; keep the series count low or compute the long windows from the shorter recorded series. The recording rules need data for as long as their window to be meaningful, so the 3-day alert is not trustworthy until the lab has run that long: in the lab, shorten every window by the same factor to see the alert fire.

A latency SLI uses the same shape with histogram buckets: good events are the requests in the bucket at the latency threshold, for example http_server_requests_seconds_bucket{le="0.3"} divided by the total count. That series exists only if a bucket boundary at 300 ms is configured through Micrometer’s distribution settings, described in Metrics and Observability. Prometheus rule mechanics are in Recording and Alerting Rules.

Choosing targets

  • Start from what users need, not from what the system currently does: current performance is a reasonable first guess, but the target must be one that product owners, developers and operators all agree is achievable and worth defending.

  • Prefer a rolling window, which matches how users remember outages; calendar windows suit business reporting but make mid-period forecasting harder. The Workbook favours a four-week rolling window with weekly and quarterly summaries. Grafana SLO defaults to 28 days, with a minimum of 7, so each window has the same number of weekends.

  • One SLI can carry several thresholds, for example one for typical latency and one for the tail, and requests can be split into tiers with different targets.

  • A critical dependency should be at least as reliable as the user journey that depends on it; adding redundancy does not reliably multiply availability.

  • Write an error budget policy: a stakeholder-approved statement of what happens when the budget is exhausted, such as prioritising reliability work or pausing risky releases, with owners and an escalation path. Without it an SLO is a metric and not a decision tool.

Composite SLOs

A user journey that crosses services is better described by combining their SLOs than by averaging raw metrics. Kibana offers composite SLOs, which combine multiple SLOs into one health indicator with a weighted average; they are in preview on Serverless and on the Elastic Stack since 9.5. The weights are a design decision: weight by traffic or by business impact and write down why. Source: https://www.elastic.co/docs/solutions/observability/incident-management/service-level-objectives-slos.

Grafana SLO

Grafana SLO is documented as a Grafana Cloud capability (its pages live under the Grafana Cloud documentation); on a self-managed Grafana use the Prometheus recipe above. To create an SLO you choose an evaluation period (default 28 days, minimum 7), define the SLI as either a ratio query (a success counter and a total counter, from which Grafana generates the PromQL) or an advanced query (a ratio of numerator to denominator returning a value between 0 and 1), choose the source data source where the query runs and the target data source where recording rules are stored, set the target percentage (Grafana uses 90 days of history to estimate how likely you are to meet it), name it with labels such as team or service (the labels also drive alert routing), and add alert rules. The alert rules come in two kinds: fast burn, on short windows, for severe problems, and slow burn, on longer windows, for gradual drain. When you save, Grafana creates a dashboard (burn rate, error budget and SLI results), recording rules for the SLI and the error budget and the alert rules, all in the same folder, and recreates them if someone deletes them. Maintenance windows can pause budget consumption and burn rate alerting for planned work.

Source: https://grafana.com/docs/grafana-cloud/observe-and-act/alert-and-measure-reliability/slo/ and https://grafana.com/docs/grafana-cloud/observe-and-act/alert-and-measure-reliability/slo/create/. The Grafana-specific detail, including building burn-rate alerts on OSS, is on SLOs & IRM. Grafana’s alerting guide explains when an SLO reduces alert noise: when a metric has no actionable response, when several teams alert on the same user-facing metric with different thresholds, and when a transient condition flaps, because the budget accumulates the cumulative impact of short failures (https://grafana.com/docs/grafana/latest/alerting/guides/when-slos-reduce-alert-noise/).

Kibana SLOs

Kibana SLOs are part of Elastic Observability and need an appropriate licence; on the Elastic Stack the cluster also needs the transform and ingest node roles because the SLO indicators are computed by Elasticsearch transforms, and on Serverless the SLO Editor role is required. SLI types include custom query (good and total KQL queries), custom metric, histogram metric, timeslice metric, APM latency, APM availability and Synthetics availability. The objective has a budgeting method (occurrences or timeslices), a time window (rolling or calendar aligned) and a target. For the Custom Query, custom metric and histogram types a group by field creates a separate SLO per value, such as a domain. Each SLO shows the share of bad events over 1, 6, 24 and 72 hours with the risk of exhausting the budget.

The SLO burn rate rule implements the multi-window pattern: each window has a lookback (the long window, with the short window one twelfth of it), a burn rate threshold and an action group that maps to a severity (critical, high, medium or low), and by default the rule has four windows, each editable. An alert fires when the burn rates over both the long and the short period exceed the threshold; the default rule created by the UI has no connector, so add one to receive notifications. The action variables include context.burnRateThreshold, context.longWindow, context.shortWindow, context.sloName, context.reason and context.viewInAppUrl.

Source: https://www.elastic.co/docs/solutions/observability/incident-management/create-an-slo and https://www.elastic.co/docs/solutions/observability/incident-management/create-an-slo-burn-rate-rule. The page does not list default threshold values, so check the windows the UI proposes against the table above. Details and the Bookshelf SLOs are on SLOs; the API form is in Alerting APIs & Terraform.

What can go wrong

  • An SLI that counts health-check or synthetic traffic as valid events flatters the SLO; define which requests are valid.

  • No traffic gives a ratio of zero over zero: the rule returns no data rather than a good value, and it must be handled explicitly (see Designing Actionable Alerts).

  • A target tighter than the dependencies can meet makes the budget run out permanently and teaches people to ignore it.

  • Using the long window alone keeps the alert firing after the incident; using the short window alone pages on blips. Use both.

  • Short evaluation windows with sparse data make burn-rate alerts flap: keep enough traffic or use longer windows for low-volume services.

  • Changing the target or the window changes what "budget remaining" means, so note the date of every change next to the numbers.

Verify it in the lab

  1. The lab Prometheus loads no rule files, so the recording rules above are not in the lab. The lab provisions the fast-burn pair as the Grafana-managed rule Bookshelf SLO burn rate (folder bookshelf): the 5xx ratio over 1 hour and over 5 minutes, both above 0.072, 14.4 times the budget of a 99.5 percent objective. Run its two ratio queries in Explore.

  2. Make Bookshelf return 5xx with curl -X POST localhost:8090/mode/failing and keep it running for ten minutes or so; the rule should go Pending, then Firing once both windows pass 0.072. Return to curl -X POST localhost:8090/mode/normal: the rule resolves soon after the 5 minute window recovers (plus its 5 minute keep-firing time), because both windows must stay above the threshold.

  3. In the kibana profile, create an SLO with the custom query SLI and the Bookshelf’s success condition, add the burn rate rule with the webhook connector, and repeat the failure to see the notification arrive in the webhook receiver.

  4. Compare the two: Prometheus rules give full control and run anywhere, while Grafana SLO and Kibana SLOs create the rules, dashboards and views for you at the price of a Cloud or subscription requirement.

In the books

Hausenblas, Cloud Observability in Action, chapter 10, introduces SLIs, SLOs and SLAs and shows how to implement SLOs with Prometheus, and also covers commercial SLO offerings. Chapman and Holmes, Observability with Grafana, chapter 9, covers writing alerts from SLIs and SLOs. The books predate Grafana’s SLO application being a Grafana Cloud feature with its own generated rules, Kibana’s SLO transforms and composite SLOs, and the burn-rate rule; the arithmetic is unchanged. Publisher pages are listed in the bibliography of the section index.