alert

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// Error budget percents for 30 day time window.
	ErrBudgetPercentPageQuick30D   = 2
	ErrBudgetPercentPageSlow30D    = 5
	ErrBudgetPercentTicketQuick30D = 10
	ErrBudgetPercentTicketSlow30D  = 10
)

From https://sre.google/workbook/alerting-on-slos/#recommended_parameters_for_an_slo_based_a table.

View Source
const AlertGenerator = generator(false)

AlertGenerator knows how to generate all the required alerts based on an SLO. The generated alerts are generic and don't depend on any specific SLO implementation.

Variables

This section is empty.

Functions

This section is empty.

Types

type MWMBAlert

type MWMBAlert struct {
	ID             string
	ShortWindow    time.Duration
	LongWindow     time.Duration
	BurnRateFactor float64
	ErrorBudget    float64
	Severity       Severity
}

MWMBAlert represents a multiwindow, multi-burn rate alert.

type MWMBAlertGroup

type MWMBAlertGroup struct {
	PageQuick   MWMBAlert
	PageSlow    MWMBAlert
	TicketQuick MWMBAlert
	TicketSlow  MWMBAlert
}

MWMBAlertGroup what represents all the alerts of an SLO. ITs divided into two groups that are made of 2 alerts: - Page & quick: Critical alerts that trigger in high rate burn in short term. - Page & slow: Critical alerts that trigger in high-normal rate burn in medium term. - Ticket & slow: Warning alerts that trigger in normal rate burn in medium term. - Ticket & slow: Warning alerts that trigger in slow rate burn in long term.

type SLO

type SLO struct {
	ID         string
	TimeWindow time.Duration
	Objective  float64
}

type Severity

type Severity int

Severity is the type of alert.

const (
	UnknownAlertSeverity Severity = iota
	PageAlertSeverity
	TicketAlertSeverity
)

func (Severity) String

func (s Severity) String() string

Jump to

Keyboard shortcuts

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