Skip to content

Commit

Permalink
[DEV-1237] Fix region of dashboard (#519)
Browse files Browse the repository at this point in the history
  • Loading branch information
datalek authored Dec 13, 2023
1 parent 3232800 commit 0d841da
Showing 1 changed file with 25 additions and 4 deletions.
29 changes: 25 additions & 4 deletions .infrastructure/75_dashboard.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ resource "aws_cloudwatch_dashboard" "main" {
"view" : "timeSeries",
"stacked" : false,
"metrics" : [
["AWS/CloudFront", "Requests", "Region", "Global", "DistributionId", aws_cloudfront_distribution.website.id, { "region" : var.aws_region }]
["AWS/CloudFront", "Requests", "Region", "Global", "DistributionId", aws_cloudfront_distribution.website.id, { "region" : "us-east-1" }],
[".", "FunctionInvocations", "FunctionName", aws_cloudfront_function.website_viewer_request_handler.id, "Region", "Global", { "region" : "us-east-1" }],
],
"title" : "Requests"
}
Expand All @@ -42,7 +43,27 @@ resource "aws_cloudwatch_dashboard" "main" {
"view" : "timeSeries",
"stacked" : false,
"metrics" : [
["AWS/CloudFront", "4xxErrorRate", "Region", "Global", "DistributionId", aws_cloudfront_distribution.website.id, { "region" : var.aws_region }],
["AWS/CloudFront", "FunctionComputeUtilization", "FunctionName", aws_cloudfront_function.website_viewer_request_handler.id, "Region", "Global", { "region" : "us-east-1" }]
],
"legend" : {
"position" : "right"
},
"title" : "Execution time"
}
},
{
"height" : 6,
"width" : 6,
"y" : 1,
"x" : 12,
"type" : "metric",
"properties" : {
"timezone" : "UTC",
"region" : var.aws_region,
"view" : "timeSeries",
"stacked" : false,
"metrics" : [
["AWS/CloudFront", "4xxErrorRate", "Region", "Global", "DistributionId", aws_cloudfront_distribution.website.id, { "region" : "us-east-1" }],
[".", "5xxErrorRate", ".", ".", ".", ".", { "region" : "us-east-1" }]
],
"title" : "4xxErrorRate, 5xxErrorRate"
Expand All @@ -52,15 +73,15 @@ resource "aws_cloudwatch_dashboard" "main" {
"height" : 6,
"width" : 6,
"y" : 1,
"x" : 12,
"x" : 18,
"type" : "metric",
"properties" : {
"timezone" : "UTC",
"region" : var.aws_region,
"view" : "timeSeries",
"stacked" : false,
"metrics" : [
["AWS/CloudFront", "BytesDownloaded", "Region", "Global", "DistributionId", aws_cloudfront_distribution.website.id, { "region" : var.aws_region }]
["AWS/CloudFront", "BytesDownloaded", "Region", "Global", "DistributionId", aws_cloudfront_distribution.website.id, { "region" : "us-east-1" }]
],
"title" : "BytesDownloaded"
}
Expand Down

0 comments on commit 0d841da

Please sign in to comment.