-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathjsonblobs.go
45 lines (39 loc) · 1.25 KB
/
jsonblobs.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
package main
type ServerFilesystem struct {
Path string `json:"Path"`
Size uint64 `json:"Size"`
Used uint64 `json:"Used"`
Free uint64 `json:"Free"`
Pct uint64 `json:"Pct"`
}
type ServerExtendedInfo struct {
Kernel string `json:"Kernel"`
OS string `json:"OS"`
Name string `json:"name"`
LastUpdated string `json:"Last Updated"`
Filesystems []ServerFilesystem
}
type ServerItemResponse struct {
Name string `json:"name"`
Date string `json:"time"`
Good bool `json:"good"`
Info ServerExtendedInfo `json:"info"`
}
type ServerListResponse struct {
Servers []ServerItemResponse `json:"servers"`
}
type PrettyAlertInfo struct {
StartTime string `json:"start_time"`
EndTime string `json:"end_time"`
Duration string `json:"duration"`
ID string `json:"alert_id"`
StateName string `json:"state_name"`
Description string `json:"info"`
Server ServerExtendedInfo `json:"server"`
Ongoing bool `json:"ongoing"`
HumanBadName string `json:"human_bad"`
}
type AlertList struct {
Active []PrettyAlertInfo `json:"active"`
Historical []PrettyAlertInfo `json:"historical"`
}