Skip to main content

Budget adjustments
Beta

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

Using the budget adjustments feature, you can exclude defined future time periods from your SLOs' error budget calculations. This ensures that events such as planned maintenance windows, deployments, or other cyclical events are not factored in the error budget calculations. By making these adjustments, you can protect your error budget and ensure that it is not impacted by non-critical events. Additionally, you can replay your SLO without any effect on your budget adjustment.

With budget adjustments, you can:

Shield your error budget
Shield your error budget from expected downtime, such as scheduled maintenance or deployment.
Customize your budget adjustment needs
Use flexible recurrence rules to apply ad-hoc adjustments or schedule cyclical adjustment events to ensure that any issues will throw your SLOs off track.
Control your error budget
Disregard future periods when you don't need to meet your SLOs.
beta feature

Budget adjustment is a beta functionality. Currently, you can only apply it to future events using sloctl or the Nobl9 Terraform provider.

Overview

Adding budget adjustments

You can add future budget adjustment events using YAML definition in sloctl:

General YAML sample for kind: BudgetAdjustment
apiVersion: n9/v1alpha
kind: BudgetAdjustment
metadata:
name: string # Mandatory
displayName: string # Optional
spec:
description: string # Optional
firstEventStart: YYYY-MM-DDThh:mm:ssZ # Mandatory, defined start date-time point
duration: 1h
rrule: FREQ=DAILY;INTERVAL=1
filters:
slos:
- name: string # Mandatory
project: string # Mandatory

FieldTypeDescription
spec.firstEventStart
mandatory
stringScheduled start time for the first adjustment event. The expected value must be a string representing the date and time in the RFC3339 format. firstEventStart is equivalent to to the DSTART property in iCal.
Constraints:
firstEventStart can be be at most 60 days in the past.
spec.duration
mandatory
stringThe duration of the budget adjustment event.
Constraints:
• The expected value for this field is a string formatted as a time duration
• The duration must be defined with a precision of 1 minute
• Example: 1h10m
spec.rrule
mandatory
stringThe iCalendar recurrence rule for the budget adjustment event.
Constraints:
• The expected value is a string in the iCal RRULE format
• Example: FREQ=MONTHLY;BYMONTHDAY=1
• Use RRULE calculator to create the desired recurrence rule
rrule can't be applied to past events.
spec.filters.slos[]
mandatory
stringA list of SLOs that will be attached to the budget adjustment event. spec.filters.slos[n].name and spec.filters.slos[n].project are mandatory for each list item.
note

If you apply BudgetAdjustment with firstEventStart in the past and defined rrule, sloctl will return an error:

Error: Validation failed: Cannot apply BudgetAdjustment. firstEventStart is in the past, and RRULE cannot be applied to past events.

Deleting future budget adjustments

If you want to delete future, recurrence-based budget adjustments, use the sloctl delete command. For example:

sloctl delete -f ./budgetadjustment.yaml

or

sloctl delete budgetadjustment budget-adjustment-name
tip

Check sloctl delete documentation to learn more.

Recurrence rule format

Using spec.rrule you can create one-time adjustments for ad hoc needs or define a rule for predictable events that happen regularly. The spec.rrule field follows iCalendar specification.

The format of the rrule field consists of key-value pairs separated by semicolons (;). Each key-value pair specifies a parameter of the recurrence rule. Nobl9 supports all iCalendar rules outlied in the iCalendar documentation.

Example:

Budget adjustment will repeat every three days for a total of 10 occurrences.
apiVersion: n9/v1alpha
kind: BudgetAdjustment
...
spec:
rrule: FREQ=DAILY;INTERVAL=3;COUNT=10
tip

Use the rrule generator to create a recurrence rule suited to your needs.

Deeper dive
Want to know more?

The FREQ value in the rrule definition specifies the frequency of the adjustment event. The value can be one of the following:

  • SECONDLY
  • MINUTELY
  • HOURLY
  • DAILY
  • WEEKLY
  • MONTHLY
  • YEARLY

The INTERVAL value specifies the interval between each recurrence. The value is an integer representing the number of units of the frequency type. For example, if FREQ=DAILY and INTERVAL=2, the event occurs every two days.

You can also include additional parameters such as BYDAY, BYMONTH, BYSETPS, for more complex recurrence patterns.

User experience

Impact on SLI data

Budget adjustment events don't affect SLI data. When the budget adjustment is active, Nobl9 collects data points and displays them on the SLI chart.

You can see the budget adjustment event on the SLI chart, marked by an annotation with the the icon. When you hover over the budget adjustment area, you can see the collected data points:

adjustment on sli chart
Image 1: SLI chart with a marked budget adjustment event

When you hover over the Reliability burn down and the Error budget burn rate charts, you can see data gaps in the budget adjustment event's area:

adjustment on the rbd chart
Image 2: Reliability burn down and Burn rate charts marked with adjustment event

Editing budget adjustments

There can be three types of budget adjustment based on the last timestamp received by an SLO.

Let's assume that the last data point was received around Apr 24, 09:25:

Past adjustment event(s)
These are budget adjustment events that were completed before Apr 24, 09:25 (a and b in the image below). Any changes made to their budget adjustment definition won't affect them since Nobl9 finished processing calculations for these events.
Ongoing adjustment event(s)
Budget adjustment events have already started before Apr 24, 09:25, but they haven't finished yet (c in the image below).

Any changes made to their definition may affect their duration, either by shortening or extending it. However, the minimum time to which they'll be shortened will be the time already processed for the budget adjustment event. The start time of these events will remain unaffected by any changes made in their definition.

Future adjustment event(s)
These budget adjustment events will start after Apr 24, 09:25 (d in the image below). All changes made in the budget adjustment definition will affect them.
adjustment on the rbd chart
Image 3: An SLO with past (a, b), ongoing (c), and future (d) adjustment events
For a more in-depth look, consult additional resources: