Skip to main content

SLO Objective Unique Identifier

With the release of the SLO objective unique identifier, all SLO objectives have a new name identifier in the YAML definition.

As a 30 day grace period starting point, Nobl9 will pre-generate names for all existing objectives. If during the grace period you create a new SLO without specifying the name, Nobl9 will generate those as well. You can then update the name only through sloctl, and you can only do that once. To do so, you can either:

  • use the sloctl get slos command and replace the files in your repository with those returned by the command, or
  • use the sloctl get slos command, change the generated names, and then use the apply command (optional).
note

You can’t change the name once you’ve updated it.

During the grace period, the name identifier will be:

  • optional for new objectives, and
  • optional when updating the existing objectives with pre-generated names.

After the grace period, Nobl9 will require the name value to be unique across all objectives within a single SLO. As such, Nobl9 will require the objective name in YAML files. Once you provide the objective name, it can’t be changed or modified later on.

As such, we encourage you to start using the name field for all objectives in all SLOs (see the YAML samples below).

Here’s an example of an old YAML definition for SLO objectives:

objectives:
- displayName: Good
op: lte
value: 0.25
target: 0.50
- displayName: Moderate
op: lte
value: 0.5
target: 0.75
- displayName: Annoying
op: lte
value: 1.0
target: 0.95

Here’s an example of a new YAML for SLO objectives:

objectives:
- displayName: Good
name: objective-1 # new field
op: lte
rawMetric:
query:
prometheus:
promql: 'cpu_usage_user{cpu="cpu-total"}'
value: 7.5
target: 0.9
- displayName: Poor
name: objective-2 # new field
op: lte
rawMetric:
query:
prometheus:
promql: 'cpu_usage_user{cpu="cpu-total"}'
value: 9.5
target: 0.99