forked from netSkopePlatformEng/alertmanager2es
-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.go
52 lines (44 loc) · 1.43 KB
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package main
import "time"
type FlatAlert struct {
Receiver string `json:"receiver"`
Status string `json:"status"`
Alert Alert `json:"alert"`
GroupLabels map[string]string `json:"groupLabels"`
CommonLabels map[string]string `json:"commonLabels"`
CommonAnnotations map[string]string `json:"commonAnnotations"`
ExternalURL string `json:"externalURL"`
Version string `json:"version"`
GroupKey string `json:"groupKey"`
Timestamp time.Time `json:"@timestamp"`
}
type Alert struct {
Status string `json:"status"`
Labels map[string]string `json:"labels"`
Annotations map[string]string `json:"annotations"`
StartsAt time.Time `json:"startsAt"`
EndsAt time.Time `json:"endsAt"`
GeneratorURL string `json:"generatorURL"`
Fingerprint string `json:"fingerprint"`
}
/*
type Labels struct {
Alertname string `json:"alertname"`
Service string `json:"service"`
Severity string `json:"severity"`
}
type Annotations struct {
Summary string `json:"summary"`
}
type GroupLabels struct {
Alertname string `json:"alertname"`
}
type CommonLabels struct {
Alertname string `json:"alertname"`
Service string `json:"service"`
Severity string `json:"severity"`
}
type CommonAnnotations struct {
Summary string `json:"summary"`
}
*/