Skip to main content

Creating a composite SLO

Reading time: 0 minute(s) (0 words)

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 version

For full functionality, use sloctl version v0.3.0 or later.

Access requirements​

To create a composite SLO, you need the following permissions:

ResourceRequired permissionMandatory
ProjectView on the target projectMandatory
SLO (composite)Create/Edit on SLOs within the target projectMandatory
SLO (component)View on each component SLOβ€’ Optional: create an empty composite SLO
β€’ Mandatory: add components to the composite SLO
Alert policyEdit to apply the required alert policiesOptional
Alert methodUse to the necessary alert methodsOptional

Nobl9 Web​

The Composite SLO wizard guides you through setting up a composite SLO step by step. To access the wizard:

  1. Go to the Service Level Objectives page.
  2. Click Create SLO.
  3. Select Composite.

Then, follow the wizard steps.

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.

sloctl​

To create a composite SLO with sloctl:

  1. Create a YAML file based on the provided template:
- 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

For more information on the fields, see the YAML Guide.

  1. 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.