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