Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Alert ¶
Alert wraps a model.Alert with additional information relevant to internal of the Alertmanager. The type is never exposed to external communication and the embedded alert has to be sanitized beforehand.
type AlertSlice ¶
type AlertSlice []*Alert
AlertSlice is a sortable slice of Alerts.
func (AlertSlice) Len ¶
func (as AlertSlice) Len() int
func (AlertSlice) Less ¶
func (as AlertSlice) Less(i, j int) bool
func (AlertSlice) LogValue ¶
func (as AlertSlice) LogValue() slog.Value
LogValue implements slog.LogValuer. It returns a summary of alert counts per alertname, e.g. "MyAlert: 3, OtherAlert: 1".
func (AlertSlice) Swap ¶
func (as AlertSlice) Swap(i, j int)
type AlertState ¶
type AlertState string
AlertState is used as part of AlertStatus.
const ( AlertStateUnprocessed AlertState = "unprocessed" AlertStateActive AlertState = "active" AlertStateSuppressed AlertState = "suppressed" )
Possible values for AlertState.
type AlertStatus ¶
type AlertStatus struct {
State AlertState `json:"state"`
SilencedBy []string `json:"silencedBy"`
InhibitedBy []string `json:"inhibitedBy"`
}
AlertStatus stores the state of an alert and, as applicable, the IDs of silences silencing the alert and of other alerts inhibiting the alert. Note that currently, SilencedBy is supposed to be the complete set of the relevant silences while InhibitedBy may contain only a subset of the inhibiting alerts – in practice exactly one ID. (This somewhat confusing semantics might change in the future.)