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 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.
func (Windows) GetSpeedPageSlow ¶ added in v0.9.0
func (Windows) GetSpeedTicketQuick ¶ added in v0.9.0
func (Windows) GetSpeedTicketSlow ¶ added in v0.9.0
Click to show internal directories.
Click to hide internal directories.