alertschema

package
v0.0.0-...-20989ac Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alert

type Alert struct {
	AlertName   string            `yaml:"alert"          validate:"required"`
	Expression  string            `yaml:"expr"           validate:"required"             hash:"ignore"`
	For         string            `yaml:"for,omitempty"                                  hash:"ignore"`
	Labels      map[string]string `yaml:"labels"         validate:"required,labels"`
	Annotations map[string]string `yaml:"annotations"    validate:"required,annotations" hash:"ignore"`
}

Alert is a generic representation of an alert that can be used to configure alert managers such as Prometheus Alertmanager (not implemented currently).

Currently this schema is used to create a yaml file that will be committed to a Git repo for GitOps based alert management. The responsibility to register and activate these alerts is left to the continuous integration assumed to have been setup in the Git repo.

type AlertGroup

type AlertGroup struct {
	Name   string  `yaml:"name"`
	Alerts []Alert `yaml:"rules"`
}

AlertGroup contains alerts grouped by name.

Jump to

Keyboard shortcuts

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