![]() |
VOOZH | about |
The Datadog Agent and Datadog Amazon ECS integration can retrieve ECS resources for the ECS Explorer. This feature enables you to monitor the status of EC2 and Fargate tasks, services, and other ECS components across all of your AWS accounts. You can view resource specifications for tasks within a service and correlate them with related logs, metrics, profiling, and more.
Note: The Datadog Agent only reports ECS tasks. Enable AWS Resource Collection to populate all ECS resources.
Ensure you have enabled AWS resource collection, the ECS on EC2 integration, and the ECS on Fargate integration.
Note: The collection interval for these integrations is approximately 15 minutes. Datadog recommends installing the Datadog Agent in your ECS cluster to achieve a shorter collection interval of 15 seconds.
If using the task definition to install the Datadog Agent, add this environment variable to the Datadog Agent container to activate this feature.
This feature is enabled by default in Datadog Agent version 7.64.0 and later.
{"containerDefinitions": [{"name": "datadog-agent","environment": [{"name": "DD_ECS_TASK_COLLECTION_ENABLED","value": "true"}# (...)]# (...)}],# (...)}For manual configuration, include the following line in the Datadog Agent configuration file.
ecs_task_collection_enabled:trueFor ECS on Fargate, it is recommended to use the AWS FireLens integration built on Datadog’s Fluent Bit output plugin to send logs to Datadog. To ensure that logs are properly correlated between ECS resources and the log explorer, set dd_source to ecs:
{
"logConfiguration": {
"logDriver": "awsfirelens",
"options": {
"Name": "datadog",
"apikey": "<DATADOG_API_KEY>",
"Host": "http-intake.logs.datadoghq.com",
"dd_service": "...",
"dd_source": "ecs",
"dd_message_key": "log",
"dd_tags": "...",
"TLS": "on",
"provider": "ecs"
}
}
}
Use the Select Resources dropdown menu in the top left corner of the page to switch between Tasks, Services, Clusters, and other ECS resources.
Each view includes a data table for organizing information by fields such as status, name, and AWS tags, along with a detailed Cluster Map to provide an overview of your tasks and ECS clusters.
Refer to Query filter details for information on filtering these views.
Group tasks by tags for an aggregated view that helps you find information more efficiently. You can group tasks using the Group by bar located at the top right of the page or by clicking on a specific tag and finding the group by function in the context menu, as illustrated below.
Additionally, use facets on the left side of the page to filter or group resources according to your interests, such as tasks with Fargate launch type.
The cluster map provides a comprehensive view of your tasks and ECS clusters, allowing you to see all resources on one screen with customizable groups and filters. You can also select which metrics to color the nodes.
To examine resources from the cluster map, click on any circle or group to display a detailed panel.
Click on any row in the table or any object in the Cluster Map to display detailed information about a specific resource in a side panel.
The Task Definition tab in the side panel shows the complete task definition.
For task definitions, it also provides a history of seven days, allowing you to view all task definition revisions used by running tasks over the past week and compare changes between them.
Other tabs provide additional information for troubleshooting the selected resource:
DNS or ip_type, or use the Group by filter to group network data by tags, such as task_name or service.You can refine displayed resources by entering a query in the Filter by search bar at the top left of the page. The query filtering operates similarly to the filtering in the Kubernetes Explorer.
In the ECS Explorer, you can use tag# to search across both Datadog tags and AWS tags.
In addition to the tags you have configured in your Datadog Agent, Datadog generates additional tags based on resource attributes, which can assist in your searching and grouping needs. These tags are conditionally added to resources when relevant.
All resources include the following tags:
aws_account: AWS account IDregion: AWS account region<resource_name>_arn: Resource ARN tags, such as task_arn, task_definition_arn, service_arn, and more.ecs_<resource_name>: Resource name tags, such as ecs_task, ecs_task_definition, ecs_service, and more.Related Resources are tagged in relation to one another. Some examples include:
XYZ-ARN, can have tags ecs_service:xyz and service_arn:xyz-arn.XYZ-ARN, can have tags ecs_cluster:xyz and cluster_arn:xyz-arn.Tip: Use the filter query autocomplete feature to explore available related resource tags. Type
ecs_to see suggested results.
Some resources have specific tags. The following tags are available in addition to the shared tags mentioned above.
| Resource | Extracted Tags |
|---|---|
| Task | task_familytask_versiontask_launch_type |
| Task Definition | task_familytask_versiontask_launch_typetask_definition_status |
| Service | task_familytask_versiontask_launch_typeservice_status |
| Resource | Resource Collection With Datadog Agent | Resource Collection Without Datadog Agent | Datadog Agent Without Resource Collection |
|---|---|---|---|
| Cluster | ~15 minutes | ~15 minutes | Not Collected |
| Task | ~15 seconds | ~15 minutes | ~15 seconds |
| Task Definition | ~15 seconds | ~15 minutes | Not Collected |
| Service | ~15 seconds | ~15 minutes | Not Collected |
| Container Instance | ~15 minutes | ~15 minutes | Not Collected |
availability_zone.Additional helpful documentation, links, and articles:
| |