alertmanager

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SummaryLabel is the name of the label containing the an alert's summary.
	SummaryLabel = "summary"
	// DescriptionLabel is the name of the label containing the an alert's description.
	DescriptionLabel = "description"
	// SourceLabel is the name of the label containing the an alert's source.
	SourceLabel = "source"
	// SeverityLabel is the name of the label containing the an alert's severity.
	SeverityLabel = "severity"
	// ComponentLabel is the name of the label containing the an alert's component.
	ComponentLabel = "component"
	// GroupLabel is the name of the label containing the an alert's group.
	GroupLabel = "group"
)

Variables

View Source
var (
	// PrometheusAlertGeneratedDiagnosisPrefix is the name prefix for diagnoses generated by prometheus alerts.
	PrometheusAlertGeneratedDiagnosisPrefix = "prometheus-alert"
	// PrometheusAlertAnnotation is the annotation used to store the prometheus alert that triggers a diagnosis.
	PrometheusAlertAnnotation = util.KubeDiagPrefix + PrometheusAlertGeneratedDiagnosisPrefix
)

Functions

This section is empty.

Types

type Alert added in v0.3.1

type Alert types.Alert

func (*Alert) Component added in v0.3.1

func (a *Alert) Component() string

Component returns the component of the alert. It is equivalent to the "component" label.

func (*Alert) Description added in v0.3.1

func (a *Alert) Description() string

Description returns the description of the alert. It is equivalent to the "description" label.

func (*Alert) Group added in v0.3.1

func (a *Alert) Group() string

Group returns the group of the alert. It is equivalent to the "group" label.

func (*Alert) Severity added in v0.3.1

func (a *Alert) Severity() string

Severity returns the severity of the alert. It is equivalent to the "severity" label.

func (*Alert) Source added in v0.3.1

func (a *Alert) Source() string

Source returns the source of the alert. It is equivalent to the "source" label.

func (*Alert) Summary added in v0.3.1

func (a *Alert) Summary() string

Summary returns the summary of the alert. It is equivalent to the "summary" label.

type Alertmanager

type Alertmanager interface {
	// Handler handles http requests.
	Handler(http.ResponseWriter, *http.Request)
}

Alertmanager can handle valid post alerts requests.

func NewAlertmanager

func NewAlertmanager(
	ctx context.Context,
	logger logr.Logger,
	cli client.Client,
	cache cache.Cache,
	repeatInterval time.Duration,
	alertmanagerEnabled bool,
) Alertmanager

NewAlertmanager creates a new Alertmanager.

Jump to

Keyboard shortcuts

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