---
title: "Create an availability SLO | Grafana Labs"
description: "Use the Grafana SLO wizard to define your SLI and create an availability SLO."
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

# Create an availability SLO

Grafana SLO provides a wizard-based interface for creating SLOs. The wizard guides you through defining your SLI first by selecting a time window, data source, and query type. For availability SLOs using a ratio query, you specify success and total metrics.

To create an availability SLO, complete the following steps:

1. On the left navigation menu, click **Alerts &amp; IRM**.
2. Click **SLO**.
3. Click **New SLO**.
4. In the **Time window** field, enter `28d` for a 28-day rolling window.
   
   A 28-day rolling window is commonly used for availability SLOs. It smooths out short spikes and aligns with how error budgets are often consumed.
5. From the **Data source** dropdown, select the data source that contains your metrics.
6. For **Query type**, select **Ratio query**.
   
   The Ratio query option appears when you select a Prometheus-compatible data source.
7. In the **Success metric** field, enter a Prometheus counter metric for successful events.
   
   For example, you might enter `http_requests_total{status!~"5.."}` to count successful responses (non-5xx status codes).
8. In the **Total metric** field, enter a Prometheus counter metric for all events (e.g., `http_requests_total`).
9. Click **Run queries** to display a preview of your SLI ratio based on the metrics you configured.

**Don’t have a metric like `http_requests_total`?** Your application or exporter may use different metric names or labels. See [SLI examples](/docs/slo/latest/sli-examples/) for other patterns (e.g. log-based or custom metrics), or use Explore to find counters that represent success and total in your data source.

Click **Set target and error budget** to save your progress and move to the next step.

In the next milestone, you’ll set a target, name your SLO, and save it.

* * *

### More to explore (optional)

At this point in your journey, you can explore the following paths:

- [SLO creation documentation](/docs/grafana-cloud/alerting-and-irm/slo/)
- [SLO best practices](/docs/slo/latest/best-practices/)
