matrix-prometheus/internal/webhook/payload.go

34 lines
522 B
Go
Raw Permalink Normal View History

2023-01-13 21:24:39 +01:00
package webhook
import (
"time"
)
const (
StatusFiring = "firing"
StatusResolved = "resolved"
)
type Payload struct {
Version string
GroupKey string
TruncatedAlerts int
Status string
Receiver string
GroupLabels map[string]any
CommonLabels map[string]any
CommonAnnotations map[string]any
ExternalURL string
Alerts []Alert
}
type Alert struct {
Status string
Labels map[string]any
Annotations map[string]any
StartsAt time.Time
EndsAt time.Time
GeneratorURL string
Fingerprint string
}