AlertCondition (v2alpha)¶
AlertCondition defines when an SLO alert condition is breaching. AlertPolicySpec.AlertWhenBreaching controls whether that state triggers an alert.
Properties¶
apiVersion¶
string required
Version represents a version of the OpenSLO specification.
Allowed values: openslo.com/v2alpha
Validation rules
| Rule |
|---|
| property is required |
must be equal to openslo.com/v2alpha |
kind¶
string required
Kind represents all the object kinds defined by OpenSLO specification. Keep in mind not all specification versions support every Kind.
Allowed values: AlertCondition
Validation rules
| Rule |
|---|
| property is required |
must be equal to AlertCondition |
metadata¶
struct required reference
See the metadata definition in the overview.
Validation rules
| Rule |
|---|
| property is required |
spec¶
struct required
AlertConditionSpec defines an alert's severity and breach condition.
Validation rules
| Rule |
|---|
| property is required |
spec.severity ¶
string required
Severity is a consumer-defined alert classification.
Validation rules
| Rule |
|---|
| property is required |
spec.condition ¶
struct required
AlertConditionType defines a burn-rate comparison over a lookback window. Burn rate is error-budget consumption relative to the rate allowed by the SLO.
Validation rules
| Rule |
|---|
| property is required |
spec.condition.kind ¶
string required
Kind selects the condition algorithm.
AlertConditionKind identifies the evaluation algorithm for an AlertConditionType.
Allowed values: burnrate
Validation rules
| Rule |
|---|
| property is required |
| must be one of: burnrate |
spec.condition.op ¶
string conditionally required
Operator compares the calculated burn rate with Threshold.
Operator specifies a comparison operation for an SLO objective or alert condition.
Possible values: gt, lt, gte, lte
The applicable values depend on the conditions in the validation rules below.
Validation rules
| Rule | Applies when |
|---|---|
| property is required | kind is burnrate |
| must be one of: gt, lt, gte, lte | kind is burnrate |
spec.condition.threshold ¶
float64 conditionally required
Threshold sets the numeric burn-rate boundary.
Validation rules
| Rule | Applies when |
|---|---|
| property is required | kind is burnrate |
spec.condition.lookbackWindow ¶
string conditionally required
LookbackWindow sets the period for burn-rate calculation.
DurationShorthand represents a duration as an integer and a DurationShorthandUnit, such as "1m" or "10d". A zero value encodes as empty text.
Validation rules
| Rule | Applies when |
|---|---|
| property is required | kind is burnrate |
Validation of value components
These rules apply to parts of this value.
Component: unit
Possible values: m, h, d, w
| Rule | Applies when |
|---|---|
| property is required | kind is burnrate |
| must be one of: m, h, d, w | kind is burnrate |
Component: value
| Rule | Applies when |
|---|---|
must be greater than or equal to 0 |
kind is burnrate |
spec.condition.alertAfter ¶
string conditionally required
AlertAfter sets how long the burn-rate comparison must remain true before the condition becomes breaching.
DurationShorthand represents a duration as an integer and a DurationShorthandUnit, such as "1m" or "10d". A zero value encodes as empty text.
Validation rules
| Rule | Applies when |
|---|---|
| property is required | kind is burnrate |
Validation of value components
These rules apply to parts of this value.
Component: unit
Possible values: m, h, d, w
| Rule | Applies when |
|---|---|
| property is required | kind is burnrate |
| must be one of: m, h, d, w | kind is burnrate |
Component: value
| Rule | Applies when |
|---|---|
must be greater than or equal to 0 |
kind is burnrate |
spec.description ¶
string
Description summarizes the alert condition.
Validation rules
| Rule |
|---|
| property is optional |
| length must be less than or equal to 1050 |