Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InhibitRule ¶
type InhibitRule struct { // The set of Filters which define the group of source alerts (which inhibit // the target alerts). SourceMatchers labels.Matchers // The set of Filters which define the group of target alerts (which are // inhibited by the source alerts). TargetMatchers labels.Matchers // A set of label names whose label values need to be identical in source and // target alerts in order for the inhibition to take effect. Equal map[model.LabelName]struct{} // contains filtered or unexported fields }
An InhibitRule specifies that a class of (source) alerts should inhibit notifications for another class of (target) alerts if all specified matching labels are equal between the two alerts. This may be used to inhibit alerts from sending notifications if their meaning is logically a subset of a higher-level alert.
func NewInhibitRule ¶
func NewInhibitRule(cr config.InhibitRule) *InhibitRule
NewInhibitRule returns a new InhibitRule based on a configuration definition.
type Inhibitor ¶
type Inhibitor struct {
// contains filtered or unexported fields
}
An Inhibitor determines whether a given label set is muted based on the currently active alerts and a set of inhibition rules. It implements the Muter interface.
func NewInhibitor ¶
func NewInhibitor(ap provider.Alerts, rs []config.InhibitRule, mk types.Marker, logger log.Logger) *Inhibitor
NewInhibitor returns a new Inhibitor.
Click to show internal directories.
Click to hide internal directories.