-
Notifications
You must be signed in to change notification settings - Fork 0
/
cw_dashboard.tftpl
138 lines (138 loc) · 5.5 KB
/
cw_dashboard.tftpl
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
{
"widgets": [
%{ for idx, region in keys(albs) ~}
{
"height": ${height},
"width": ${floor((24/max_regions_per_x) / pow(2, 0))},
"y": ${height*0},
"x": ${((floor(24/max_regions_per_x) * idx) + floor((24/max_regions_per_x) / pow(2, 0))*0)%24},
"type": "metric",
"properties": {
"metrics": [
[ "AWS/ApplicationELB", "HTTPCode_Target_5XX_Count", "LoadBalancer", "${albs[region]}", { "color": "#d62728" } ],
[ ".", "HTTPCode_Target_2XX_Count", ".", ".", { "color": "#2ca02c" } ],
[ ".", "HTTPCode_Target_3XX_Count", ".", ".", { "color": "#1f77b4" } ],
[ ".", "HTTPCode_Target_4XX_Count", ".", ".", { "color": "#ff7f0e" } ]
],
"view": "timeSeries",
"stacked": false,
"region": "${region}",
"title": "${upper(split("-", region)[0])} Status Codes",
"period": 300,
"stat": "Sum"
}
},
{
"height": ${height},
"width": ${floor( (24/max_regions_per_x) / pow(2, 1) )},
"y": ${height*1},
"x": ${((floor(24/max_regions_per_x) * idx) + floor((24/max_regions_per_x) / pow(2, 1))*0)%24},
"type": "metric",
"properties": {
"view": "timeSeries",
"stacked": false,
"metrics": [
[ "AWS/ApplicationELB", "ActiveConnectionCount", "LoadBalancer", "${albs[region]}" ],
[ ".", "NewConnectionCount", ".", "." ]
],
"region": "${region}",
"title": "${upper(split("-", region)[0])} Connections"
}
},
{
"height": 6,
"width": ${floor( (24/max_regions_per_x) / pow(2, 1) )},
"y": ${height*1},
"x": ${((floor(24/max_regions_per_x) * idx) + floor((24/max_regions_per_x) / pow(2, 1))*1)%24},
"type": "metric",
"properties": {
"view": "timeSeries",
"stacked": true,
"metrics": [
[ "AWS/ElasticBeanstalk", "EnvironmentHealth", "EnvironmentName", "${env_name}" ]
],
"region": "${region}",
"annotations": {
"horizontal": [
{
"label": "Severe",
"value": 20,
"fill": "above"
},
[
{
"label": "Degraded",
"value": 12.5
},
{
"value": 20,
"label": "Degraded"
}
],
{
"label": "Healthy",
"value": 12.5,
"fill": "below"
}
]
},
"title": "${upper(split("-", region)[0])} Environment Health"
}
},
{
"height": ${height},
"width": ${floor( (24/max_regions_per_x) / pow(2, 0) )},
"y": ${height*2},
"x": ${((floor(24/max_regions_per_x) * idx) + floor((24/max_regions_per_x) / pow(2, 0))*0)%24},
"type": "metric",
"properties": {
"metrics": [
[ "AWS/ApplicationELB", "TargetResponseTime", "LoadBalancer", "${albs[region]}", { "color": "#bcbd22" } ]
],
"view": "timeSeries",
"stacked": false,
"region": "${region}",
"title": "${upper(split("-", region)[0])} Response Time",
"period": 300,
"stat": "Average"
}
},
{
"height": ${height},
"width": ${floor( (24/max_regions_per_x) / pow(2, 1) )},
"y": ${height*3},
"x": ${((floor(24/max_regions_per_x) * idx) + floor((24/max_regions_per_x) / pow(2, 1))*0)%24},
"type": "metric",
"properties": {
"metrics": [
[ "AWS/ApplicationELB", "RequestCount", "LoadBalancer", "${albs[region]}" ]
],
"view": "timeSeries",
"stacked": false,
"region": "${region}",
"title": "${upper(split("-", region)[0])} Requests",
"period": 300,
"stat": "Sum"
}
},
{
"height": ${height},
"width": ${floor( (24/max_regions_per_x) / pow(2, 1) )},
"y": ${height*3},
"x": ${((floor(24/max_regions_per_x) * idx) + floor((24/max_regions_per_x) / pow(2, 1))*1)%24},
"type": "metric",
"properties": {
"metrics": [
[ "AWS/ApplicationELB", "ProcessedBytes", "LoadBalancer", "${albs[region]}", { "color": "#8c564b" } ]
],
"view": "timeSeries",
"stacked": false,
"region": "${region}",
"title": "${upper(split("-", region)[0])} Processed Bytes",
"period": 300,
"stat": "Sum"
}
}%{ if idx < length(albs)-1 },%{ endif }
%{ endfor ~}
]
}