Budget adjustments Beta
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:
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
- Working YAML
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 # Optional
filters:
slos:
- name: string # Mandatory
project: string # Mandatory
apiVersion: n9/v1alpha
kind: BudgetAdjustment
metadata:
name: working-budget-adjustment
displayName: Working budget adjustment
spec:
description: Budget adjustment event happening monthly on the first Tuesday of each month for 1 hour.
firstEventStart: 2024-01-01T12:00:00Z
duration: 1h
rrule: FREQ=MONTHLY;INTERVAL=1;BYDAY=1TU
filters:
slos:
- name: latency-slo
project: project-alpha
- name: uptime-slo
project: project-beta
- name: throughput-slo
project: project-gamma
Field | Type | Description |
---|---|---|
spec.firstEventStart mandatory | string | Scheduled 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 | string | The 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 optional | string | The 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 | string | A 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. |
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
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:
apiVersion: n9/v1alpha
kind: BudgetAdjustment
...
spec:
rrule: FREQ=DAILY;INTERVAL=3;COUNT=10
Use the rrule
generator to create a recurrence rule suited to your needs.
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](/img/adjustment-sli.gif)
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](/img/adjustment-rbd.gif)
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
:
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.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.
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](/img/adjustment-events.png)