The Service Map for APM is here!

AWS CloudFront

Crawler Crawler

Overview

Amazon CloudFront is a global content delivery network (CDN) service that accelerates delivery of your websites, APIs, video content or other web assets.

Enable this integration to see in Datadog all your CloudFront metrics.

Setup

Installation

If you haven’t already, set up the Amazon Web Services integration first.

Metric collection

  1. In the AWS integration tile, ensure that CloudFront is checked under metric collection.

  2. Install the Datadog - AWS CloudFront integration.

Log collection

Enable Cloudfront Logging

When you enable logging for a distribution, specify the Amazon S3 bucket that you want CloudFront to store log files in. If you’re using Amazon S3 as your origin, we recommend that you do not use the same bucket for your log files; using a separate bucket simplifies maintenance.

Cloudfront logging 1
Cloudfront logging 1

Important note: Store the log files for multiple distributions in the same bucket. When enabling logging, specify “cloudfront” as prefix for the file names, to keep track of which log files are associated with which distributions.

Send Logs to Datadog

  1. If you haven’t already, set up the Datadog log collection AWS Lambda function.
  2. Once the lambda function is installed, manually add a trigger on the S3 bucket that contains your Cloudfront logs in the AWS console, in your Lambda, click on S3 in the trigger list:
    S3 trigger configuration
    Configure your trigger by choosing the S3 bucket that contains your ELB logs and change the event type to Object Created (All) then click on the add button.
    S3 Lambda trigger configuration

Once done, go in your Datadog Log section to start exploring your logs!

Data Collected

Metrics

aws.cloudfront.4xx_error_rate
(gauge)
The percentage of all requests for which the HTTP status code is 4xx.
shown as percent
aws.cloudfront.5xx_error_rate
(gauge)
The percentage of all requests for which the HTTP status code is 5xx.
shown as percent
aws.cloudfront.bytes_downloaded
(count)
The number of bytes downloaded by viewers for GET, HEAD, and OPTIONS requests.
shown as byte
aws.cloudfront.bytes_uploaded
(count)
The number of bytes uploaded to your origin with CloudFront using POST and PUT requests.
shown as byte
aws.cloudfront.requests
(count)
The number of requests for all HTTP methods and for both HTTP and HTTPS requests.
aws.cloudfront.total_error_rate
(gauge)
The percentage of all requests for which the HTTP status code is 4xx or 5xx.
shown as percent

Each of the metrics retrieved from AWS will be assigned the same tags that appear in the AWS console, including but not limited to host name, security-groups, and more.

Events

The AWS Cloudfront integration does not include any event at this time.

Service Checks

The AWS Cloudfront integration does not include any service check at this time.

Troubleshooting

Need help? Contact Datadog Support.