slo

package
v0.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2022 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Indicator

type Indicator struct {
	Ratio   *RatioIndicator
	Latency *LatencyIndicator
}

type LatencyIndicator

type LatencyIndicator struct {
	Success  Metric
	Total    Metric
	Grouping []string
}

type Metric

type Metric struct {
	Name          string
	LabelMatchers []*labels.Matcher
}

func (Metric) Metric

func (m Metric) Metric() string

type MultiBurnRateAlert

type MultiBurnRateAlert struct {
	Severity string
	Short    time.Duration
	Long     time.Duration
	For      time.Duration
	Factor   float64

	QueryShort string
	QueryLong  string
}

type Objective

type Objective struct {
	Labels      labels.Labels
	Description string
	Target      float64
	Window      model.Duration
	Config      string

	Indicator Indicator
}

func (Objective) Alerts

func (o Objective) Alerts() ([]MultiBurnRateAlert, error)

func (Objective) Burnrate

func (o Objective) Burnrate(timerange time.Duration) string

func (Objective) Burnrates

func (o Objective) Burnrates() (monitoringv1.RuleGroup, error)

func (Objective) ErrorsRange

func (o Objective) ErrorsRange(timerange time.Duration) string

func (Objective) IncreaseRules added in v0.3.0

func (o Objective) IncreaseRules() ([]monitoringv1.Rule, error)

func (Objective) Name

func (o Objective) Name() string

func (Objective) QueryErrorBudget

func (o Objective) QueryErrorBudget() string

func (Objective) QueryErrors

func (o Objective) QueryErrors(window model.Duration) string

QueryErrors returns a PromQL query to get the amount of request errors during the window.

func (Objective) QueryTotal

func (o Objective) QueryTotal(window model.Duration) string

QueryTotal returns a PromQL query to get the total amount of requests served during the window.

func (Objective) RequestRange

func (o Objective) RequestRange(timerange time.Duration) string

type RatioIndicator

type RatioIndicator struct {
	Errors   Metric
	Total    Metric
	Grouping []string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL