Datadog Synthetics is now available!

Integration Setup for ECS Fargate

Set up integrations for ECS Fargate with Docker Label Annotations.

Add an Integration

If you already set up the Container Agent in ECS Fargate, follow these steps to add an integration to your existing cluster.

Update the Task Definition

  1. Log in to your AWS Web Console and navigate to the ECS section.
  2. Choose the cluster the Datadog Agent is running on.
  3. Click the Tasks tab, then click the Task definition name containing the Datadog Agent Container.
  4. Click the Create new revision button, then click the Add container button.
  5. Enter the Container name, Image, and any additional preference settings.
  6. Under Docker labels add the following:

    Key Value
    com.datadoghq.ad.instances [{"host": "%%host%%", "port": <PORT_NUMBER>}]
    com.datadoghq.ad.check_names ["<CHECK_NAME>"]
    com.datadoghq.ad.init_configs [{}]
  7. Click the Add button, then click the Create button.

Update the Service

  1. Within the cluster, click the Services tab, then click the Service Name.
  2. Click the Update button.
  3. For the Task Definition, choose the latest Revision from the drop-down menu.
  4. Click the Next step button 3 times, then click the Update Service button.

Verification

When the updated Task displays a RUNNING status, use these pages to verify information is reporting to Datadog:

Examples

Use the following table to enter the Docker labels via the AWS Web Console for a Redis container:

Key Value
com.datadoghq.ad.instances [{"host": "%%host%%", "port": 6379}]
com.datadoghq.ad.check_names ["redisdb"]
com.datadoghq.ad.init_configs [{}]

Use the following JSON under containerDefinitions to create a Redis container via the AWS CLI tools.

{
    "name": "redis",
    "image": "redis:latest",
    "essential": true,
    "dockerLabels": {
        "com.datadoghq.ad.instances": "[{\"host\": \"%%host%%\", \"port\": 6379}]",
        "com.datadoghq.ad.check_names": "[\"redisdb\"]",
        "com.datadoghq.ad.init_configs": "[{}]"
    }
}

Further Reading

Additional helpful documentation, links, and articles: