Amazon ECS

Looking to deploy the containerized Datadog Agent to your ECS cluster? See the Amazon ECS Agent documentation.

Overview

Amazon ECS on EC2 is a highly scalable, high performance container management service for Docker containers running on EC2 instances.

Collect ECS metrics automatically from CloudWatch using the Amazon ECS Datadog integration. Expand on those metrics by querying the ECS API for ECS events, tags, and the status of container instances, tasks, and services.

Setup

Installation

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

Metric collection

  1. Follow the AWS Integration role delegation setup instructions.
  2. Ensure the following permissions for your Datadog IAM policy are set to collect Amazon ECS metrics. For more information on ECS policies, read Actions, resources, and condition keys for Amazon Elastic Container Service in the AWS documentation.
AWS PermissionDescription
ecs:ListClustersReturns a list of existing clusters.
ecs:ListContainerInstancesReturns a list of container instances in a specified cluster.
ecs:ListServicesLists the services that are running in a specified cluster.
ecs:DescribeContainerInstancesDescribes Amazon ECS container instances.
  1. In the AWS integration page, ensure that ECS is enabled under the Metric Collection tab.

    Amazon ECS Configuration

When metric collection is enabled, an out-of-the-box dashboard that provides detailed information about your ECS metrics is available for this integration. See Monitoring ECS with Datadog for more details.

Data collected

Metrics

See metric-spec.json for a list of metrics provided by this integration.

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

Note: Metrics prefixed with ecs.containerinsights.* can be collected by enabling Collect custom metrics under the Metric Collection tab of the AWS Integration page.

Events

To reduce noise, the Amazon ECS integration is automatically set up to include only events that contain the following words: drain, error, fail, insufficient memory, pending, reboot, terminate. See example events below:

Amazon ECS Events

To remove the inclusion list and receive all events from your Datadog Amazon ECS integration, reach out to Datadog support.

Service Checks

aws.ecs.agent_connected

Whether the ECS Agent is connected.

Statuses: ok, critical

Troubleshooting

Need help? Contact Datadog support.