---
id: create-slo
title: Create an SLO
description: Learn how to create an SLO for reliability management.
keywords:
- _view=sumologic_slo_output
- sloVersion
slug: /help/docs/observability/reliability-management-slo/create-slo/
canonical: https://www.sumologic.com/help/docs/observability/reliability-management-slo/create-slo/
---
import useBaseUrl from '@docusaurus/useBaseUrl';
When creating an SLO, you'll need to define the following:
* SLI (service level indicator) metric you are tracking and target configuration using ratio- or threshold-based definitions
* SLO (service level objective) defining the target and duration to monitor (for example, the uptime for the target)
* Basic details for SLO name and description
You have multiple configurations for creating SLOs:
* **Measurement for SLO**: Windows of time or requests.
* **Query type**: Metrics or logs.
* **Calculation definition**: Ratio (tracked amount against a total) or threshold. Instead of defining two queries to identify successful versus total events to create a ratio, you can specify a threshold for the total events query that identifies successful events.
The following table lists the available options for an SLO:
| | Window-based | Request-based |
|:---------|:-----|:---------|
| **Metrics-based SLO** | Ratio and Threshold | Ratio Only |
| **Logs-based SLO** | Ratio and Threshold | Ratio and Threshold |
import TerraformLink from '../../reuse/terraform-link.md';
:::tip
You can use Terraform to manage SLOs with the [`sumologic_slo`](https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs/resources/slo) and [`sumologic_slo_folder`](https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs/resources/slo_folder) resources.
[**Classic UI**](/docs/get-started/sumo-logic-ui-classic). In the main Sumo Logic menu select **Manage Data > Monitoring > SLOs**.
2. Click **Add** > **New SLO**. Optionally, you can also:
* Create folders to manage your SLOs.
* Import an SLO.
To transfer data immediately and create an SLO using an import, you should first export JSON content to use that formatting. The Sumo Logic JSON format may change without notice. See [Export and Import Content in the Library](/docs/get-started/library#import-and-export-content-in-the-library) for complete details.
1. Click **Add** > **Import**.
1. Enter a Name for the SLO.
1. Copy and paste the JSON in the text editor.
1. Click **Import**.
3. Select the **Signal Type**:
* **Latency**. Select to calculate the speed of services, lag time.
* **Error**. Select to monitor for errors that occur in your services.
* **Throughput**. Select to track the throughput of services and processing.
* **Availability**. Select to monitor the uptime of services.
* **Other**. Select to monitor any other metric or log for SLIs.
4. Select the Evaluation Type which determines how the events are measured:
* **Window-based**. Select the time frame window for the events. Window sizes should be between 1m to 60m.
* **Request-based.**
Select the **Query Type** to select and build your queries for the SLI data. You have a choice of metrics or logs with a ratio-based (partial against the total) or threshold-based (events amount against a set threshold amount) calculation.
Follow the instructions below based on the query type:
| Metrics: Ratio-based | Metrics: Threshold-based |
For Ratio-based definition, define queries for the successful or unsuccessful events to calculate against total events:
|
For Threshold-based definitions, which calculate against success criteria:
|
| Logs: Ratio-based | Logs: Threshold-based |
For Ratio-based definitions, which calculate successful or unsuccessful events against total events:
|
For Threshold-based definitions, which calculate against success criteria:
|
5. Define your SLO for target amount and duration period to monitor:
* **Target**. The value in percentage you want to target for the SLO (for example, you'd enter `99` for 99%).
* **Compliance Type**. **Rolling** provides a sequence of recent days for the Compliance Period, such as the last 7d or last 30d. **Calendar** calculates over a window of time for a Week.
* **Timezone**. Selecting a timezone is important to accurately assign events on the boundary of a compliance period, such as events received at 11:59 PM in a particular time zone.
6. Enter SLO Details:
* **Name**. Name of the SLO.
* **Description**. Short explanation of your SLO.
* **Tags**. Tags are key/value pairs that allow you to apply additional metadata to your SLOs beyond the name and description. [Learn more here](#tags-and-filters). Tags can help you categorize, search, and filter your SLOs. They also enable you to correlate your other content items and data with SLOs.
7. Click **Save**. To create a monitor, click [Create an SLO from monitors list page](#create-an-slo-from-monitors-list-page).
## Create an SLO from log search page
You can create SLOs directly from your Sumo Logic log search. This allows you to validate queries, quickly create SLOs, and reuse queries from existing dashboard panels.
1. Enter a new **Log search** query (or use an existing one).
1. Click the **More Actions** (kebab icon) dropdown menu.
1. Click **Create an SLO**.
## Create an SLO from Metrics page
To create an SLO from the **Metrics** page:
1. [**New UI**](/docs/get-started/sumo-logic-ui). In the main Sumo Logic menu, select **Metrics > All Metric Searches**. You can also click the **Go To...** menu at the top of the screen and select **All Metric Searches**.
1. Click the three-dot kebab icon, then select **Create an SLO**.
1. Follow the instructions under [Create an SLO (general)](#create-an-slo-general).
You can use [metrics operators](/docs/metrics/metrics-operators) for metrics-based SLOs. The metrics query specified in your SLO should have a quantization after the selector. You can specify one or more operators in the query for SLO.
As an example, a pure selector query with no operators could be `_sourceCategory=my-web-server metric=is_healthy`, which returns one time series per instance your web server indicating if it is healthy or not (`1` or `0`). To count the number of instances that were healthy in a given minute, you can use the `sum` operator with an appropriate quantization method and interval, as follows: `_sourceCategory=my-web-server metric=is_healthy | quantize to 1m using max | sum`.
## Create an SLO from monitors list page
Critical monitors are great candidates to convert to SLOs. From the **Monitors** section, you can create a monitor- and window-based SLO for a given trigger condition.
As an example, say you have an existing monitor that fires a **Critical** alert if the latency of a customer-critical service exceeds 500ms. By creating an SLO directly through this specific monitor, those thresholds will automatically carry over into the new SLO, saving you time and effort.
:::warning Prerequisite
Your monitor must be in an **active** state.
:::
1. [**New UI**](/docs/get-started/sumo-logic-ui). In the main Sumo Logic menu, select **Monitoring > Monitors**. You can also click the **Go To...** menu at the top of the screen and select **Monitors**.
})
1. **Define your SLO**. Set your window-based threshold here.
1. When you're done, click **Save**, which will save the SLO.
To edit SLO parameters:
1. Go to the **SLO** tab, locate your SLO and click on it. (If you're unable to find it, try applying filters or go to the search bar at the top and enter the SLO name or folder name.)
1. Edit definition and other parameters.
To edit SLO parameters from a monitor:
1. Go to the **Monitors** tab and click on any monitor.
1. In the panel, click **Monitor-based SLO** to view the list of SLOs associated with that particular monitor.
:::important
Any monitor update that changes the monitor definition will lead to a change in the version of related SLOs. This means that the SLO history or SLI will get reset for the SLO. Example include trigger condition changes and evaluation delay changes. Changes unrelated to the definition like **Name**, **Description** will not affect the related SLOs.
:::
### SLI calculation for monitor-based SLOs
SLIs for monitor-based SLOs are calculated at a granularity of 1 minute. One minute is treated as unsuccessful if the monitor threshold is violated at any point of time within that minute.
## Create an SLO via Terraform
You can use the Sumo Logic Terraform provider to automate the creation of [SLOs (`sumologic_slo`)](https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs/resources/slo) and [SLO folders (`sumologic_slo_folder`)](https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs/resources/slo_folder). This can be useful for organizations that want to:
* Templatize SLOs
* Standardize the configuration of SLOs, monitors, and dashboards
* Automate SLO-related workflows
You can use the [monitor Terraform provider (`sumologic_monitor`)](https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs/resources/monitor) to create monitors associated with SLOs.
## Managing your SLOs
Below are some best practices for managing your SLOs.
[**New UI**](/docs/get-started/sumo-logic-ui/). To access SLOs, in the main Sumo Logic menu select **Monitoring > SLOs**. You can also click the **Go To...** menu at the top of the screen and select **SLOs**.
[**Classic UI**](/docs/get-started/sumo-logic-ui-classic). To access SLOs, in the main Sumo Logic menu select **Manage Data > Monitoring > SLOs**.
### Tags and Filters
You can add key/value pair tags to your SLOs to allow you to better organize and filter them. For example, you might find it useful to add tags for `team`, `service`, and `application`.
:::note Limitations
- Tag keys cannot start with the prefixes `sumo.` or `_`
- Tag keys must only contain letters, numbers, and/or the symbols `_`, `.`, `/`, `+`, `-`, `@`
- Tag values can only contain letters, white spaces, numbers, and/or the symbols `_`, `.`, `/`, `=`, `+`, `-`, `@`
- You can associate a maximum of 50 tags per SLO.
:::
#### Add a tag
To add a tag(s) to an existing SLO:
1. Click on any SLO line item in your list, then click **Edit**.
1. Scroll down to section **(3) SLO Details**. Click on **Tags (Optional)** and type in a new tag or select an existing tag.
1. Click **Save**.
To add a tag while creating a new SLO:
1. Click **Add** > **New SLO**.
1. After you've filled out sections **1** and **2**, scroll down to section **(3) SLO Details**. Click on **Tags (Optional)** and type in a new tag or select an existing tag.
1. Click **Save**.
#### Filter SLOs by tags
After you've added a tag, you'll see it populate in the **Tags** column next to your SLO in the list.
1. Click **Add a filter** at the top of the screen, then click **Tag**.
2. Scroll through the list of tags or type in the tag name you're looking for.
If you run a query with multiple values for same tag key, they are `OR`'d. Tag filters for different tag keys are `AND`'d.
In this tag filter example query below, it's looking for SLOs where the `service` is either `cart` OR `checkout` OR `coffee-machine`.
### Save filter
You can create and save custom filter views, allowing you to focus on the SLOs and insights most important to you. In this example, we'll create a view that contains the filters we've created above.
1. Click in the **Add a filter** field.
2. Enter the filters. In this example (see screenshot below #3), we are using tag filters. To use a tag filter, select `tag` -> select tag key (`application` in this example) -> select value for that tag key (`coffee-bar` in this example). You can select multiple filters for a saved filters.
3. Click the **Save Filter** icon on the right.
4. Enter a name for the filter (we'll call it `Coffee Bar Application`).
5. Optionally, you can set this as your default view so that when you load SLOs list page, this set of filters will be rendered by default.
6. Click **Save**.
This is how default filter rendering looks like:
:::note
You can also set a saved filter view as default later by clicking the kebab menu next to the funnel icon > Click on **Set as default**.
:::
You can see the list of all saved filter views by clicking on the funnel icon.
You can make further modifications to a saved filter view later using kebab menu options next to the funnel icon.
:::note
* A maximum of 10 saved views are allowed per user.
* Saved filter views are only visible to you and cannot be shared with other users in your org.
:::