MCPcopy Create free account
hub / github.com/prometheus/common / Alert

Struct Alert

model/alert.go:29–41  ·  view source on GitHub ↗

Alert is a generic representation of an alert in the Prometheus eco-system.

Source from the content-addressed store, hash-verified

27
28// Alert is a generic representation of an alert in the Prometheus eco-system.
29type Alert struct {
30 // Label value pairs for purpose of aggregation, matching, and disposition
31 // dispatching. This must minimally include an "alertname" label.
32 Labels LabelSet `json:"labels"`
33
34 // Extra key/value information which does not define alert identity.
35 Annotations LabelSet `json:"annotations"`
36
37 // The known time range for this alert. Both ends are optional.
38 StartsAt time.Time `json:"startsAt,omitempty"`
39 EndsAt time.Time `json:"endsAt,omitempty"`
40 GeneratorURL string `json:"generatorURL"`
41}
42
43// Name returns the name of the alert. It is equivalent to the "alertname" label.
44func (a *Alert) Name() string {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected