SLI (v2alpha)¶
SLI defines a derived reliability indicator calculated from one or more metric queries against data sources.
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: SLI
Validation rules
| Rule |
|---|
| property is required |
must be equal to SLI |
metadata¶
struct required reference
See the metadata definition in the overview.
Validation rules
| Rule |
|---|
| property is required |
spec¶
struct
SLISpec defines the query or queries used to calculate an SLI.
Validation rules
| Rule |
|---|
exactly one of thresholdMetric and ratioMetric must be set |
spec.description ¶
string
Description summarizes the indicator.
Validation rules
| Rule |
|---|
| property is optional |
| length must be less than or equal to 1050 |
spec.thresholdMetric ¶
struct
ThresholdMetric defines a query that returns raw values. SLOObjective.Operator compares each value with SLOObjective.Value.
SLIMetricSpec supplies an implementation-defined query in the v2alpha flattened layout.
Validation rules
| Rule |
|---|
| property is optional |
exactly one of dataSourceRef and dataSourceSpec must be set |
spec.thresholdMetric.dataSourceRef ¶
string
DataSourceRef names an existing DataSource.
Validation rules
| Rule | Details | Examples |
|---|---|---|
| property is optional | ||
| length must be between 1 and 63 | ||
string must match regular expression: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ |
an RFC-1123 compliant label name must consist of lower case alphanumeric characters or -, and must start and end with an alphanumeric character |
my-name123-abc |
spec.thresholdMetric.dataSourceSpec ¶
struct reference
DataSourceSpec embeds the complete data-source connection configuration.
See the DataSource specification.
Validation rules
| Rule |
|---|
| property is optional |
spec.thresholdMetric.spec ¶
map[string]interface
Spec contains implementation-defined query configuration at the same level as the data-source selection.
spec.thresholdMetric.spec.*~ ¶
string
spec.thresholdMetric.spec.* ¶
interface
spec.ratioMetric ¶
struct
RatioMetric defines component queries or a precomputed ratio for an SLO objective.
SLIRatioMetric defines an indicator as SLIRatioMetric.Good divided by SLIRatioMetric.Total, (SLIRatioMetric.Total minus SLIRatioMetric.Bad) divided by SLIRatioMetric.Total, or SLIRatioMetric.Raw. SLIRatioMetric.RawType identifies Raw as a success or failure ratio. For example, 990 good events out of 1,000 total events produce 0.99. 10 bad events with the same total produce the same success ratio.
Validation rules
| Rule | Applies when |
|---|---|
| property is optional | |
exactly one of total and raw must be set |
|
| properties are mutually exclusive: bad, good, raw | |
| one of [bad, good] properties must be set, none was provided | total is set |
spec.ratioMetric.counter ¶
bool
Counter reports whether the good, bad, and total metrics are monotonically increasing counters. It has no effect when Raw is used.
spec.ratioMetric.good ¶
struct
Good is the success-count numerator used with Total.
SLIMetricSpec supplies an implementation-defined query in the v2alpha flattened layout.
Validation rules
| Rule |
|---|
| property is optional |
exactly one of dataSourceRef and dataSourceSpec must be set |
spec.ratioMetric.good.dataSourceRef ¶
string
DataSourceRef names an existing DataSource.
Validation rules
| Rule | Details | Examples |
|---|---|---|
| property is optional | ||
| length must be between 1 and 63 | ||
string must match regular expression: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ |
an RFC-1123 compliant label name must consist of lower case alphanumeric characters or -, and must start and end with an alphanumeric character |
my-name123-abc |
spec.ratioMetric.good.dataSourceSpec ¶
struct reference
DataSourceSpec embeds the complete data-source connection configuration.
See the DataSource specification.
Validation rules
| Rule |
|---|
| property is optional |
spec.ratioMetric.good.spec ¶
map[string]interface
Spec contains implementation-defined query configuration at the same level as the data-source selection.
spec.ratioMetric.good.spec.*~ ¶
string
spec.ratioMetric.good.spec.* ¶
interface
spec.ratioMetric.bad ¶
struct
Bad is the failure-count input used with Total to derive successes.
SLIMetricSpec supplies an implementation-defined query in the v2alpha flattened layout.
Validation rules
| Rule |
|---|
| property is optional |
exactly one of dataSourceRef and dataSourceSpec must be set |
spec.ratioMetric.bad.dataSourceRef ¶
string
DataSourceRef names an existing DataSource.
Validation rules
| Rule | Details | Examples |
|---|---|---|
| property is optional | ||
| length must be between 1 and 63 | ||
string must match regular expression: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ |
an RFC-1123 compliant label name must consist of lower case alphanumeric characters or -, and must start and end with an alphanumeric character |
my-name123-abc |
spec.ratioMetric.bad.dataSourceSpec ¶
struct reference
DataSourceSpec embeds the complete data-source connection configuration.
See the DataSource specification.
Validation rules
| Rule |
|---|
| property is optional |
spec.ratioMetric.bad.spec ¶
map[string]interface
Spec contains implementation-defined query configuration at the same level as the data-source selection.
spec.ratioMetric.bad.spec.*~ ¶
string
spec.ratioMetric.bad.spec.* ¶
interface
spec.ratioMetric.total ¶
struct
Total is the denominator paired with Good or Bad.
SLIMetricSpec supplies an implementation-defined query in the v2alpha flattened layout.
Validation rules
| Rule |
|---|
| property is optional |
exactly one of dataSourceRef and dataSourceSpec must be set |
spec.ratioMetric.total.dataSourceRef ¶
string
DataSourceRef names an existing DataSource.
Validation rules
| Rule | Details | Examples |
|---|---|---|
| property is optional | ||
| length must be between 1 and 63 | ||
string must match regular expression: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ |
an RFC-1123 compliant label name must consist of lower case alphanumeric characters or -, and must start and end with an alphanumeric character |
my-name123-abc |
spec.ratioMetric.total.dataSourceSpec ¶
struct reference
DataSourceSpec embeds the complete data-source connection configuration.
See the DataSource specification.
Validation rules
| Rule |
|---|
| property is optional |
spec.ratioMetric.total.spec ¶
map[string]interface
Spec contains implementation-defined query configuration at the same level as the data-source selection.
spec.ratioMetric.total.spec.*~ ¶
string
spec.ratioMetric.total.spec.* ¶
interface
spec.ratioMetric.rawType ¶
string conditionally required
RawType identifies whether Raw contains a success or failure ratio when Raw is used.
SLIRawMetricType identifies whether a raw ratio contains successes (good/total) or failures (bad/total).
Possible values: success, failure
The applicable values depend on the conditions in the validation rules below.
Validation rules
| Rule | Applies when |
|---|---|
| property is required | raw is set |
| must be one of: success, failure | raw is set |
spec.ratioMetric.raw ¶
struct
Raw supplies an already computed ratio.
SLIMetricSpec supplies an implementation-defined query in the v2alpha flattened layout.
Validation rules
| Rule |
|---|
| property is optional |
exactly one of dataSourceRef and dataSourceSpec must be set |
spec.ratioMetric.raw.dataSourceRef ¶
string
DataSourceRef names an existing DataSource.
Validation rules
| Rule | Details | Examples |
|---|---|---|
| property is optional | ||
| length must be between 1 and 63 | ||
string must match regular expression: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ |
an RFC-1123 compliant label name must consist of lower case alphanumeric characters or -, and must start and end with an alphanumeric character |
my-name123-abc |
spec.ratioMetric.raw.dataSourceSpec ¶
struct reference
DataSourceSpec embeds the complete data-source connection configuration.
See the DataSource specification.
Validation rules
| Rule |
|---|
| property is optional |
spec.ratioMetric.raw.spec ¶
map[string]interface
Spec contains implementation-defined query configuration at the same level as the data-source selection.