Alert is a generic representation of an alert in the Prometheus eco-system.
| 27 | |
| 28 | // Alert is a generic representation of an alert in the Prometheus eco-system. |
| 29 | type 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. |
| 44 | func (a *Alert) Name() string { |
nothing calls this directly
no outgoing calls
no test coverage detected