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
| # 建立 CloudWatch 儀表板
aws cloudwatch put-dashboard \
--dashboard-name "Synthetics-Monitoring" \
--dashboard-body '{
"widgets": [
{
"type": "metric",
"x": 0,
"y": 0,
"width": 12,
"height": 6,
"properties": {
"metrics": [
["CloudWatchSynthetics", "SuccessPercent", "CanaryName", "my-website-canary"],
[".", "Failed", ".", "."]
],
"title": "Canary Success Rate",
"period": 300,
"stat": "Average",
"region": "ap-northeast-1"
}
},
{
"type": "metric",
"x": 12,
"y": 0,
"width": 12,
"height": 6,
"properties": {
"metrics": [
["CloudWatchSynthetics", "Duration", "CanaryName", "my-website-canary"]
],
"title": "Canary Duration",
"period": 300,
"stat": "Average",
"region": "ap-northeast-1"
}
},
{
"type": "metric",
"x": 0,
"y": 6,
"width": 24,
"height": 6,
"properties": {
"metrics": [
["CloudWatchSynthetics", "2xx", "CanaryName", "my-website-canary"],
[".", "4xx", ".", "."],
[".", "5xx", ".", "."]
],
"title": "HTTP Status Codes",
"period": 300,
"stat": "Sum",
"region": "ap-northeast-1"
}
}
]
}'
|