inhibit

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

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 types.Matchers
	// The set of Filters which define the group of target alerts (which are
	// inhibited by the source alerts).
	TargetMatchers types.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 InihibtRule 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.

func NewInhibitor

func NewInhibitor(ap provider.Alerts, rs []*config.InhibitRule, mk types.Marker, logger log.Logger) *Inhibitor

NewInhibitor returns a new Inhibitor.

func (*Inhibitor) Mutes

func (ih *Inhibitor) Mutes(lset model.LabelSet) bool

Mutes returns true iff the given label set is muted.

func (*Inhibitor) Run

func (ih *Inhibitor) Run()

Run the Inihibitor's background processing.

func (*Inhibitor) Stop

func (ih *Inhibitor) Stop()

Stop the Inhibitor's background processing.

Jump to

Keyboard shortcuts

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