Creating a composite
This article provides prerequisites and steps to create a composite.
You can create a composite using Nobl9 web, sloctl
and Terraform.
sloctl
versionFor full functionality,
use sloctl
version v0.3.0
or later.
Access requirements
To create a composite, the following permissions are required (fields with asterisks are mandatory):
Resource | Permission |
---|---|
Project* | The Create projects permission |
SLO (component)* | The View permission to necessary components |
Composite* | The Create/Edit permission to SLOs in the required project |
Alert policy | The Edit and apply permission to the required alert policies |
Alert method | The Apply permission to the necessary alert methods |
Nobl9 Web
The Composite SLO wizard guides you through setting up Composite SLOs step by step. To access the Wizard, go to the SLO grid view, click Create SLO, and select Composite.
- Step 1: General information
- Step 2: Components
- Step 3: Budget
- Step 4: Alerting
- Step 5: Summary
In this step, you provide basic details about your composite SLO to establish its identity and context.
- Display name: The name displayed for your composite SLO.
- Project: Select the project to which the composite SLO belongs.
- Service: Specify the associated service.
- Description (Optional): Add context or explanation for your Composite SLO.
- Labels (Optional): Attach metadata for organization and filtering.
- Links (Optional): Add references or supporting materials.
In this step, you define your Composite SLO's structure by configuring its composite settings and components. Learn more about composite structure.
Composite settings:
- Max delay: Specifies how long Nobl9 waits for delayed data from a component, measured from the last data point received by the most recent component.
- When delayed: Determines how Nobl9 handles data delayed beyond the max delay threshold:
- Count as good: Treat delayed data as good.
- Count as bad: Treat delayed data as bad.
- Ignore: Exclude delayed components from calculations.
For composites using the Occurrences budgeting method, delayed data marked as Count as good
restores the error budget.
Recommended for:
- Experimental SLOs with expected delays.
- SLOs with sparse metrics.
Learn more about delayed data in composites 2.0
Component Settings: A component SLO is an individual SLO that contributes to the overall performance and hierarchy of the composite structure. You can select up to 20 components for your composite SLO by clicking the Select components button and accessing the components selector:
The following settings are available for components:
- Weight: Represents the importance of each component. Assign higher weights to critical components and lower weights to less critical ones.
- Normalized weight: Reflects the relative importance of each component within the Composite SLO structure.
- Last data point: Indicates when the component last collected data. Components with outdated data may require attention.
- When delayed: Handles delayed data for individual components. Options:
- Count as good: Treat delayed component data as good.
- Count as bad: Treat delayed component data as bad.
- Ignore: Exclude delayed components from calculations.
Set the composite error budget and reliability targets within a defined time window.
Learn more about composite's budget and targets in the composite guide.
Budget settings:
- Reliability target: Specify the desired reliability percentage.
- 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.
Time window settings:
- Rolling: Monitors performance over a trailing time frame (e.g., the last 30 days).
- Calendar-aligned: Aligns performance tracking with calendar periods (e.g., monthly, quarterly).
Define alert policies to monitor your composite SLO effectively (optional). You can configure up to 20 alert policies to specify conditions and notification channels for timely alerts.
Review and finalize your composite SLO configuration. The summary step:
- Summarizes the settings for all steps.
- Highlights incomplete or invalid configurations.
- Indicates steps requiring further action.
sloctl
- Create a YAML file following 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
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: my-composite
displayName: My composite
project: my-project
labels:
key:
- my-label
value:
- value-1
- value-2
spec:
description: My composite SLO
alertPolicies:
- my-alert-policy-1
- my-alert-policy-2
attachments:
- displayName: My attachment
url: https://my-url.com
budgetingMethod: Occurrences
objectives:
- displayName: My composite objective
name: my-composite-objective
target: 0.7
composite:
maxDelay: 15m
components:
objectives:
- project: project-1
slo: my-slo-1
objective: my-objective-1
displayName: My objective 1
weight: 1
whenDelayed: CountAsGood
- project: project-2
slo: my-slo-2
objective: my-objective-2
displayName: My objective 2
weight: 3
whenDelayed: CountAsBad
- project: my-project-3
slo: my-slo-3
objective: my-objective-3
displayName: My objective 3
weight: 2.5
whenDelayed: Ignore
service: my-service
timeWindows:
- unit: Day
count: 1
isRolling: false
calendar:
startTime: 2020-04-20 10:40:00
timeZone: Europe/Warsaw
Read the field reference for more information.
- Run
sloctl apply -f %path-to-your-YAML%
As a result, your composite appears in the grid under the Service Level Objectives Nobl9 Web section.
You can add up to 20 objectives per single composite SLO