Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FSWindowsRepo ¶ added in v0.9.0
type FSWindowsRepo struct {
// contains filtered or unexported fields
}
func NewFSWindowsRepo ¶ added in v0.9.0
func NewFSWindowsRepo(config FSWindowsRepoConfig) (*FSWindowsRepo, error)
func (*FSWindowsRepo) GetWindows ¶ added in v0.9.0
type FSWindowsRepoConfig ¶ added in v0.9.0
type Generator ¶ added in v0.9.0
type Generator struct {
// contains filtered or unexported fields
}
Generator 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.
func NewGenerator ¶ added in v0.9.0
func NewGenerator(windowsRepo WindowsRepo) Generator
func (Generator) GenerateMWMBAlerts ¶ added in v0.9.0
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 Window ¶ added in v0.9.0
type Window struct {
// ErrorBudgetPercent is the error budget % consumed for a full time window.
// Google gives us some defaults in its SRE workbook that work correctly most of the times:
// - Page quick: 2%
// - Page slow: 5%
// - Ticket quick: 10%
// - Ticket slow: 10%
ErrorBudgetPercent float64
// ShortWindow is the small window used on the alerting part to stop alerting
// during a long window because we consumed a lot of error budget but the problem
// is already gone.
ShortWindow time.Duration
// LongWindow is the long window used to alert based on the errors happened on that
// long window.
LongWindow time.Duration
}
type Windows ¶ added in v0.9.0
type Windows struct {
SLOPeriod time.Duration
PageQuick Window
PageSlow Window
TicketQuick Window
TicketSlow Window
}
Windows has the information of the windows for multiwindow-multiburn SLO alerting. Its a matrix of values with: - Alert severity: ["page", "ticket"]. - Measuring period: ["long", "short"].
func (Windows) GetSpeedPageQuick ¶ added in v0.9.0
Error budget speeds based on a full time window, however once we have the factor (speed) the value can be used with any time window.