- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- Administrator's Guide
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
To monitor your ECS containers and tasks with Datadog, run the Agent as a container on every EC2 instance in your ECS cluster. As detailed below, there are a few setup steps:
This documentation assume you already have a working EC2 Container Service cluster configured. If not, see Getting started with Amazon ECS.
This task launches the Datadog container. When you need to modify the configuration, update this Task Definition as described further down in this guide. If you’re using APM or Logs, set the appropriate flags in the Task Definition.
You may either configure the task using the AWS CLI tools or using the Amazon Web Console.
datadog-agent-ecs.json
and set <YOUR_DATADOG_API_KEY>
with the Datadog API key for your account.Amazon Elastic Container Service register-task-definition --cli-input-json file:<PATH_TO_JSON_DD_AGENT_ECS>.json
dd-agent-task
.docker_sock
. For Source Path, enter /var/run/docker.sock
. Click Add.proc
and source path of /proc/
.cgroup
and source path of /cgroup/
(Use /sys/fs/cgroup/
if you are using an original Amazon Linux AMI)dd-agent
.gcr.io/datadoghq/docker-dd-agent:latest
.256
. Note: For high resource usage, you may need a higher memory limit.10
in CPU units.API_KEY
and enter your Datadog API Key in the value. If you feel more comfortable storing secrets like this in s3, take a look at the ECS Configuration guide.TAGS
./var/run/docker.sock
in the Container path. Leave the Read only checkbox un-checked./host/proc/
in the Container path. Check the Read only checkbox./host/sys/fs/cgroup
in the Container path. Check the Read only checkbox.ecs:ListClusters
: List available clusters.ecs:ListContainerInstances
: List instances of a cluster.ecs:DescribeContainerInstances
: Describe instances to add metrics on resources and tasks running, adds cluster tag to ec2 instances.For more information on ECS policies, see Identity and access management for Amazon ECS.
dd-agent-ecs
.dd-agent-policy
. Copy the following text into the Policy Document:{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ecs:RegisterContainerInstance",
"ecs:DeregisterContainerInstance",
"ecs:DiscoverPollEndpoint",
"ecs:Submit*",
"ecs:Poll",
"ecs:StartTask",
"ecs:StartTelemetrySession"
],
"Resource": ["*"]
}
]
}
Ideally you want the Datadog Agent to load on one container on each EC2 instance. The easiest way to achieve this is to run the Datadog Agent as a daemon service.
DAEMON
, and enter a Service name. Click Next.If you’re not using APM or Logs, you are finished. Otherwise, point your application containers to the underlying IP address of the host they are running on to ship information.
Datadog’s Autodiscovery can be used in conjunction with ECS and Docker to automatically discover and monitor running tasks in your environment.