Cloudfront monitoring metric & reports

2022. 11. 4. 14:39AWS/Amazon CloudFront

728x90
SMALL

- 개요

CloudFront를 모니터링하는 방법과 수집 가능한 Metrics에 대해 정리했다.

 

 

- CloudWatch metric (실시간 데이터 기준으로 최대 15개월 전까지 조회 가능)

DistributionID
FriendlyName
TimeBucket
Requests
BytesDownloaded
BytesUploaded
TotalErrorRatePct
4xxErrorRatePct
5xxErrorRatePct
Cache hit rate
Origin latency
Error rate by status code

- CloudWatch metric  구현 방법

cloudwatch에서 제공하는 metric은 cloudwatch dashboard

 

 

- CloudFront report (30분 전 데이터 기준으로 최대 30일 까지 조회 가능)

CloudFront cache statistics reports
>> Hits, Misses, Errors, Status Code, Requests, Total bytes, Bytes from misses
CloudFront popular objects report
CloudFront top referrers report
CloudFront usage reports
>> HTTP, HTTPS, From CloudFront to your users, From CloudFront to your origin
CloudFront viewers reports Device, Browsers, Opreating systems, Locations

- CloudFront report 구현 방법

csv parsing해서 dashboard로 구현
  •  

 

 

- Cloudfront logging ( standard logs access logs )

수 시간 전 데이터 기준으로 저장 기간 원하는 대로 가능

- Cloudfront logging ( standard logs access logs ) 구현 방법

s3 bucket logging
cf -> s3 -> athena -> quicksight

 

 

- Cloudfront logging ( real-time logs )

수 초 전 데이터 기준으로 저장 기간 원하는 대로 가능

- Cloudfront logging ( real-time logs ) 구현 방법

Kinesis data stream
cf -> kinesis data stream -> kinesis data firehose -> opensearch -> kibana

 

 

- Server Timing headers

cdn-cache-hit
cdn-cache-refresh
cdn-cache-miss
cdn-pop
cdn-rid
cdn-hit-layer
>> EDGE
>> REC
>> Origin Shield
cdn-upstream-layer
>> EDGE
>> REC
>> Origin Shield
cdn-upstream-dns
cdn-upstream-connect
cdn-upstream-fbl
cdn-downstream-fbl

 

 

- 참고

https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/viewing-cloudfront-metrics.html
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudwatch-csv.html
https://docs.aws.amazon.com/ko_kr/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html
https://docs.aws.amazon.com/ko_kr/AmazonCloudFront/latest/DeveloperGuide/real-time-logs.htmlhttps://aws.amazon.com/ko/blogs/korea/cloudfront-realtime-logs/
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/understanding-response-headers-policies.html#server-timing-header?
https://aws.amazon.com/blogs/networking-and-content-delivery/amazon-cloudfront-introduces-server-timing-headers/

 

728x90
LIST