Documentation ¶
Overview ¶
Package alertmanager contains business logic of working with Alertmanager.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry stores alerts and delay information by IDs.
func (*Registry) CreateAlert ¶
func (r *Registry) CreateAlert(id string, labels, annotations map[string]string, delayFor time.Duration)
CreateAlert creates alert from given AlertParams and adds or replaces alert with given ID in registry. If that ID wasn't present before, alert is added in the pending state. It we be transitioned to the firing state after delayFor interval. This is similar to `for` field of Prometheus alerting rule: https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/
func (*Registry) RemovePrefix ¶
RemovePrefix removes all alerts with given ID prefix except a given list of IDs.
Click to show internal directories.
Click to hide internal directories.