Documentation
¶
Overview ¶
This package contains types and functions useful for working with alert manager objects.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alert ¶
type Alert struct {
Status AlertStatus `json:"status,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Annotations map[string]string `json:"annotations,omitempty"`
StartsAt time.Time `json:"startsAt,omitempty"`
EndsAt time.Time `json:"endsAt,omitempty"`
GeneratorURL time.Time `json:"generatorURL,omitempty"`
}
Alert represents each of the alerts sent by the alert manager to a receiver.
type AlertStatus ¶
type AlertStatus string
AlertStatus represents the status of a alert.
const ( AlertStatusFiring AlertStatus = "firing" AlertStatusResolved AlertStatus = "resolved" )
type Message ¶
type Message struct {
Receiver string `json:"receiver,omitempty"`
Status AlertStatus `json:"status,omitempty"`
Alerts []*Alert `json:"alerts,omitempty"`
GroupLabels map[string]string `json:"groupLabels,omitempty"`
CommonLabels map[string]string `json:"commonLabels,omitempty"`
CommonAnnotations map[string]string `json:"commonAnnotations,omitempty"`
ExternalURL string `json:"exterlalURL,omitempty"`
}
Data represents each message sent by the alert manager to a receiver.
Click to show internal directories.
Click to hide internal directories.