Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultRouteOpts = RouteOpts{ GroupWait: 30 * time.Second, GroupInterval: 5 * time.Minute, RepeatInterval: 4 * time.Hour, GroupBy: map[model.LabelName]struct{}{}, GroupByAll: false, }
DefaultRouteOpts are the defaulting routing options which apply to the root route of a routing tree.
Functions ¶
This section is empty.
Types ¶
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
Dispatcher sorts incoming alerts into aggregation groups and assigns the correct notifiers to each.
func NewDispatcher ¶
func NewDispatcher( ap provider.Alerts, r *Route, s notify.Stage, mk types.Marker, to func(time.Duration) time.Duration, l log.Logger, ) *Dispatcher
NewDispatcher returns a new Dispatcher.
func (*Dispatcher) Run ¶
func (d *Dispatcher) Run()
Run starts dispatching alerts incoming via the updates channel.
type Route ¶
type Route struct {
// The configuration parameters for matches of this route.
RouteOpts RouteOpts
// Equality or regex matchers an alert has to fulfill to match
// this route.
Matchers types.Matchers
// If true, an alert matches further routes on the same level.
Continue bool
// Children routes of this route.
Routes []*Route
// contains filtered or unexported fields
}
A Route is a node that contains definitions of how to handle alerts.
type RouteOpts ¶
type RouteOpts struct {
// The identifier of the associated notification configuration.
Receiver string
// What labels to group alerts by for notifications.
GroupBy map[model.LabelName]struct{}
// Use all alert labels to group.
GroupByAll bool
// How long to wait to group matching alerts before sending
// a notification.
GroupWait time.Duration
GroupInterval time.Duration
RepeatInterval time.Duration
}
RouteOpts holds various routing options necessary for processing alerts that match a given route.
func (*RouteOpts) MarshalJSON ¶
MarshalJSON returns a JSON representation of the routing options.
Click to show internal directories.
Click to hide internal directories.