Creating a composite SLO
This article provides prerequisites and steps to create a composite SLO.
You can create a composite using the Nobl9 web UI, sloctl, or Terraform.
sloctl versionFor full functionality,
use sloctl version v0.3.0 or later.
Access requirementsβ
To create a composite SLO, you need the following permissions:
| Resource | Required permission | Mandatory |
|---|---|---|
| Project | View on the target project | Mandatory |
| SLO (composite) | Create/Edit on SLOs within the target project | Mandatory |
| SLO (component) | View on each component SLO | β’ Optional: create an empty composite SLO β’ Mandatory: add components to the composite SLO |
| Alert policy | Edit to apply the required alert policies | Optional |
| Alert method | Use to the necessary alert methods | Optional |
Nobl9 Webβ
The Composite SLO wizard guides you through setting up a composite SLO step by step. To access the wizard:
- Go to the Service Level Objectives page.
- Click Create SLO.
- Select Composite.
Then, follow the wizard steps.
- General information
- Components
- Budget
- Alerting
- Summary
General information covers the basic details that establish your composite SLO's identity and context.
- Display name: The human-readable name displayed for your composite SLO.
- Project: Select the project to contain your composite SLO.
- Service: Specify the service to contain your composite SLO.
- Description (optional): Provide additional context for your composite SLO.
- Labels (optional): Attach metadata for organization and filtering.
- Links (optional): Add URLs to reference materials or dashboards.
Components define the structure of your composite SLO. In this step, select components and configure how data from them is collected. Learn more about composite structure.
- Select the Aggregation metric to configure how component data is consolidated for calculating your composite reliability. The following aggregation methods are available:
- Reliability
Aggregating by reliability calculates the composite's reliability based on the normalized weighted average of the actual reliability of its components. - Error budget state
Aggregating by error budget state considers each component as either healthy (with error budget remaining) or exhausted (error budget burned completely). The composite's error budget is the weighted average of these component states.
- Reliability
- Set up the Delay handling options to be applied if any component delays data. These settings apply to all components of your composite SLO:
- When data is delayed
This parameter determines how Nobl9 treats delayed data. You can select Count as good (adds to the reliability and error budget), Count as bad (burns the reliability and error budget), or Ignore (the component is not included in calculations during the delay).
You can refine this parameter for individual components after adding them to the composite. - Max composite delay
Specify how long Nobl9 must wait for data from a component in the case of the delay.
Enter a positive integer and select the time unit. Nobl9 starts counting from the most recent data point received.
- When data is delayed
For composite SLOs with the Count as good parameter and Occurrences budgeting method (the Budget step), delayed data restores the error budget. Recommended for:
- Experimental SLOs with expected delays
- SLOs with sparse metrics
Learn more about delayed data in composites.
-
Component configuration provides options for selecting and fine-tuning components your composite will source data from. You can add up to 20 components per composite. To configure components:
- Click + Select components and pick the required objectives.
Skipping component selectionYou can add components to your composite SLO anytime later. Skipping component selection creates an empty composite without a structure.
Click to open practical use examples
- Top-down planning and scaffolding.
In a top-down planning approach, a team or an architect can define the high-level services and their reliability targets before the underlying SLOs are created. - Task delegation.
When different teams are responsible for different parts of a system, one team might be responsible for the overall service architecture, while individual feature teams own the underlying microservices. The first team then creates empty composite SLOs that are populated with components by microservice teams later. - Templating and standardization.
Empty composite SLOs can serve as templates to enforce consistency in naming conventions. Individual teams then can copy such a template and fill it with relevant components to monitor the reliability of specific parts of a system. - Phased rollouts and system migrations.
When a system is being built or migrated in phases, a composite SLO can be created upfront and populated gradually as new components become available.
- For each component:
- Set the weight.
Component weight represents its importance. Assign higher weights to more critical components. This value determines its Normalized weightβthe relative importance of the component within the composite SLO. - Calibrate the delay handling parameter for each component if the composite-wide option doesn't fit.
To make an informed decision, refer to the Last data point column, which indicates when the component last collected data.
- Set the weight.
Set the composite error budget and reliability targets within a defined time window.
Learn more about a composite's budget and targets in the composite guide.
Budget settings:
- Specify the required Reliability target in percent for your composite SLO.
- Select the Error budget calculation method:
- Occurrences calculates the ratio of good events to total events. Ideal for services with variable traffic where each request is equally important.
- Time slices calculates the ratio of good minutes to total minutes. Useful for services with consistent performance expectations.
For the time slices budgeting method, specify the time slice allowanceβthe percentage for data points within every minute to act as the criteria for a "good minute".
- Configure the Time window setting:
- Select Rolling to monitor performance over a trailing time frame (e.g., the last 30 days).
- Select Calendar-aligned to aligns performance tracking with calendar periods (e.g., monthly, quarterly).
Optionally, define alert policies to monitor your composite SLO. You can add up to 20 alert policies to specify conditions and notification channels for timely alerts.
Review and finalize your composite SLO configuration. The summary step allows you to:
- Review the settings from all previous steps
- Identify any incomplete or incorrect configurations
- See which steps require further action before creation
sloctlβ
To create a composite SLO with sloctl:
- Create a YAML file based on the provided template:
- General YAML
- Working sample
- apiVersion: n9/v1alpha
kind: SLO
metadata:
name: string # Mandatory
displayName: string # Optional
project: string # Mandatory
spec:
description: string # Optional
alertPolicies: array of alert policy names # Optional
labels: # A map of labels you want to attach to the composite
"key_1": # Label's key
- "value_1" # Label's value
- "value_2" # Label's value
"key_2": # Label's key
- "value_1" # Label's value
- "value_2" # Label's value
attachments: # Optional, links you need to attach to your composite
- displayName: string # Optional
url: url # Mandatory when using attachments
budgetingMethod: Occurrences | Timeslices # Mandatory
objectives:
- displayName: string # Optional
name: string # Mandatory
target: number # Mandatory
composite:
maxDelay: 1m-1h # Mandatory
components:
objectives:
- project: string # Mandatory
slo: string # Mandatory
objective: string # Mandatory
weight: float64 # Mandatory
whenDelayed: CountAsGood | CountAsBad | Ignore # Mandatory
aggregation: Reliability | ErrorBudgetState # Mandatory
service: string # Mandatory
timeWindows:
- unit: enum # Mandatory, Day | Week | Month | Quarter | Year for calendar-aligned; Minute | Hour | Day for rolling
count: number # Mandatory
isRolling: boolean # Mandatory, true for the rolling time window, false for calendar-aligned
calendar:
startTime: a timestamp in the 24h format without the time zone # Mandatory for calendar-aligned time windows
timeZone: string # Mandatory for calendar-aligned time windows
- apiVersion: n9/v1alpha
kind: SLO
metadata:
name: user-experience-slo
displayName: User experience SLO
project: default
labels:
area:
- user-experience
env:
- prod
- dev
region:
- us
- eu
team:
- green
- ux
annotations:
area: user-experience
env: prod
region: us
team: ux
spec:
description: Example composite SLO
budgetingMethod: Occurrences
objectives:
- displayName: User experience
name: user-experience
target: 0.95
composite:
maxDelay: 45m0s
components:
objectives:
- project: e-commerce
slo: store-web-latency
objective: latency
weight: 1.0
whenDelayed: CountAsGood
- project: e-commerce
slo: store-web-availability
objective: availability
weight: 4.0
whenDelayed: CountAsBad
- project: external-services
slo: payment-integration-availability
objective: availability
weight: 3.0
whenDelayed: Ignore
aggregation: Reliability
service: web-app
timeWindows:
- unit: Month
count: 1
isRolling: false
calendar:
startTime: "2022-12-01 00:00:00"
timeZone: UTC
alertPolicies:
- fast-burn-5x-for-last-10m
attachments:
- url: https://docs.nobl9.com
displayName: Nobl9 Documentation
For more information on the fields, see the YAML Guide.
- Run the following command:
sloctl apply -f path/to/your/file.yaml
After applying the configuration, your new composite SLO will appear on the Service Level Objectives page in the Nobl9 web application.