Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Class ¶ added in v0.1.8
type Class struct {
Name string `yaml:"name"`
Objectives Objectives `yaml:"objectives"`
}
Class represents a template of objectives this is important to achieve scalable SLO policies read more at: https://landing.google.com/sre/workbook/chapters/alerting-on-slos/#alerting_at_scale
type ClassesDefinition ¶ added in v0.1.8
type ClassesDefinition struct {
Classes Classes `yaml:"classes"`
}
type ExprBlock ¶
type ExprBlock struct {
AlertMethod string `yaml:"alertMethod"`
AlertWindow string `yaml:"alertWindow"`
BurnRate float64 `yaml:"burnRate"`
AlertWait string `yaml:"alertWait"`
Windows []methods.Window `yaml:"windows"`
ShortWindow *bool `yaml:"shortWindow"`
Buckets []string `yaml:"buckets"` // used to define buckets of histogram when using latency expression
Expr string `yaml:"expr"`
}
func (*ExprBlock) ComputeExpr ¶
func (*ExprBlock) ComputeQuantile ¶ added in v0.1.5
func (*ExprBlock) GetShortWindow ¶ added in v0.2.0
type Objectives ¶
type Objectives struct {
Availability float64 `yaml:"availability"`
Latency []methods.LatencyTarget `yaml:"latency"`
Window model.Duration `yaml:"window"`
}
func (*Objectives) LatencyBuckets ¶ added in v0.1.8
func (o *Objectives) LatencyBuckets() []string
LatencyBuckets returns all boundaries of latencies is the same boundaries of a prometheus histogram (aka: le) used to calculate latency SLOs
type SLO ¶
type SLO struct {
Name string `yaml:"name"`
Class string `yaml:"class"`
Objectives Objectives
HonorLabels bool `yaml:"honorLabels"`
TrafficRateRecord ExprBlock `yaml:"trafficRateRecord"`
ErrorRateRecord ExprBlock `yaml:"errorRateRecord"`
LatencyRecord ExprBlock `yaml:"latencyRecord"`
LatencyQuantileRecord ExprBlock `yaml:"latencyQuantileRecord"`
Labels map[string]string `yaml:"labels"`
Annotations map[string]string `yaml:"annotations"`
}
func (*SLO) GenerateAlertRules ¶
Click to show internal directories.
Click to hide internal directories.