Labels in Nobl9
Labels are key-value pairs that can be attached to SLOs, Services, Projects, and Alert Policies in the Nobl9 platform. Labels allow you to define attributes of resources and use them to filter and group SLOs across Services and Projects in the SLO Grid view, Service Health Dashboard, and Reports. Each label must be unique for a given SLO, but many SLOs can carry the same label.
Labels can be attached to SLOs when creating or editing a Service or a Project in the SLO Wizard and to Alerts in the Alert Policy wizard. You can select existing pre-defined labels or add new ones that are specific to your organization.
Requirements for Labels
Labels have a specific format and must conform to the following rules:
Labels must be in the
key: value
format (key=value
insloctl
).key
can contain only lowercase alphanumeric characters, underscores, and dashes; must start with a letter and end with an alphanumeric character; maximum length 63 charactersvalue
can contain Unicode characters; maximum length 200 characters
Labels can contain international (diacritic) characters.
Labels can contain underscores (
_
) and dashes (-
) between the alphanumeric characters.There can be max. 20 Labels assigned to a resource.
You cannot edit the label that was already created. To change the label, remove the existing one and create a new label by following the steps described in the Adding Labels section.
Most Common Use Cases of Labels
The following are the most common use cases for labels in the Nobl9 platform:
Area labels:
area: latency
,area: slowcheck
.Geo labels:
geo: apac
,geo: amer
,geo: eu
.Team labels:
team: green
,team: sales
.Alert Policy Labels:
alert: low
,alert: medium
,alert: high
.SLO labels:
slo: ratio
,slo: calendar
.Unit labels:
unit: seconds
,unit: ms
,unit: error per s
.Environment labels:
env: test
,env: prod
,env: staging
.
Labels for Displaying Units on SLI graphs
Labels for units have the same specific format and must conform to the rules specified in the Requirements for Labels section.
To display a unit on the SLI graph in the SLO Details tab:
During SLO creation or editing process, in step 5 of the SLO Wizard, select or add unit labels:
- enter the
unit
key and a value for it, for example,unit: ms
.
Image 1: Labels in step 5 of the SLO Wizard - enter the
After saving the changes, the unit is successfully displayed above the Y-axis, on the SLI graph, in the SLO Details tab:

Adding Labels
Adding Label(s) to SLO
- New SLO
- Existing SLO
To add Labels to new SLO, follow these steps:
Go to Service Level Objectives in the main navigation panel.
Click the
button.
In the SLO wizard > Add Name, Alert Policy and Labels, in the Labels field:
Select a Label from the dropdown menu, or
Create a new Label by entering its name and clicking on the
button.
Click the Create SLO button.
To add Labels to an existing SLO, follow these steps:
Go to Service Level Objectives in the main navigation panel.
On the relevant SLO, click the
icon to edit.
In the SLO wizard > Add Name, Alert policy, and Labels, in the Labels field:
Select a Label from the dropdown menu, or
Create a new Label by entering its name and clicking on the
button.
Click the Save SLO button.
Adding Label(s) to Service
- New Service
- Existing Service
To add Labels while creating a Service, follow these steps:
Go to Catalog > Services.
Click the
button.
In the Labels field:
Select a Label from the dropdown menu, or
Create a new Label by entering its name and clicking on the
button.
Click the Add Service button.
To add Labels to an existing Service, follow these steps:
Go to Catalog > Services.
Click the
icon.
In the Labels field:
Select a Label from the dropdown menu, or
Create a new Label by entering its name and clicking on the
button.
Click the Save Service button.
Adding Label(s) to Project
- New Project
- Existing Project
To add Labels while creating a Project, follow these steps:
Go to Catalog > Services.
Click the
button.
In the Labels field:
Select a Label from the dropdown menu, or
Create a new Label by entering its name and clicking on the
button.
Click the Create Project button.
To add Labels to an existing Project, follow these steps:
Go to Catalog > Projects.
Choose a relevant project from the Project list.
Click the
icon.
In the Labels field:
Select a Label from the dropdown menu, or
Create a new Label by entering its name and clicking on the
button.
Click the Save Project button.
Adding Label(s) to Alert Policy
- New Alert Policy
- Existing Alert Policy
To add Labels while creating an Alert Policy, follow these steps:
Go to Alerts tab.
In the Alert Policy Wizard > Add Alert Policy Name, Severity, and Labels, in the Labels field:
Select a Label from the dropdown menu, or
Create a new Label by entering its name and clicking on the
button.
Click the Create Alert Policy button.
To add Labels to an existing Alert Policy, follow these steps:
Navigate to Alerts in the main navigation pane.
Choose a relevant Alert Policy from the list.
Click the
icon.
In the Add Alert Policy Name, Severity, and Labels, in the Labels field:
Select a Label from the dropdown menu, or
Create a new Label by entering its name and clicking on the
button.
Click the Save Alert Policy button.
Removing Label(s)
To remove Labels, follow these steps:
Go to the SLO, Services, Projects, or Alert Policies list in the Nobl9 UI.
Choose a relevant resource from the list.
In the Labels field, click the
icon next to the Label that you wish to remove:
Filtering by Labels - Overview
Nobl9 allows you to filter by multiple labels:
If you enter/select multiple labels with the same key - you will be able to see resources that contain one of the labels with the same key.
If you enter/select multiple labels with different keys - you will be able to see resources that contain all the labels with different keys.
For example:
SLO | Label 1 | Label 2 |
---|---|---|
SLO A has the labels | geo: eu | team: green |
SLO B has the labels | geo: apac | team: green |
SLO C has the labels | geo: eu | team: red |
SLO D has the labels | geo: apac | team: red |
User filters by:
geo: eu
geo: apac
team: green
Applying filters displays:
SLO A
SLO B
For more information, refer to the SLO Search and Filter Logic document.
Retrieving Labelled Resources in sloctl
Retrieving SLO, Service, or a Project config also returns all the labels that are set on the objects and allows filtering them.
There are two versions of syntax accepted by sloctl
while filtering by labels:
Labels can be separated by a comma without spaces, for example:
sloctl get slo -A -l key1=value1,key2=value2,key3=value3
Labels can be separated by a
-l
with spaces in between, for example:sloctl get slo -A -l team=green -l team=orange -l key=value
Assumptions for Label Commands in sloctl
:
If you retrieve resources for two or more labels that have the same
key
, they are connected by an OR logical operator, for example:sloctl get slo -A -l team=green -l team=red
sloctl
retrieves all resources that haveteam=green
orteam=red
attached to them.If you retrieve resources for two or more labels that have different
keys
, they are connected by an AND logical operator, for example:sloctl get slo -A -l team=green -l geo=eu
sloctl
retrieves all resources that have bothteam=green
andgeo=eu
labels attached to them.