You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1.[Create a task definition file](#create-a-task-definition-file)
12
-
2.[Register the task definition](#register-the-task-definition)
13
-
3.[Run the task as a replica service](#run-the-task-as-a-replica-service)
12
+
## Metrics collected
14
13
15
-
### Create a task definition file
16
-
17
-
This task definition launches the Datadog Agent container with the necessary configurations.
18
-
19
-
1. Download (TBD: file). This files provide minimal configuration for core infrastructure monitoring. For more sample task definition files with various features enabled, see the [Set up additional Agent features](#set-up-additional-datadog-agent-features) section on this page.
20
-
2. Modify the task definition file:
21
-
- Set the `DD_API_KEY` environment variable by replacing `<YOUR_DATADOG_API_KEY>` with the [Datadog API key][1] for your account. Alternatively, you can also [supply the ARN of a secret stored in AWS Secrets Manager][2].
22
-
- Set the `DD_SITE` environment variable to your [Datadog site][3]. Your site is: {{< region-param key="dd_site" code="true" >}}
23
-
3. (Optional) To add an Agent health check, add the following line to your task definition:
24
-
```json
25
-
"healthCheck": {
26
-
"retries": 3,
27
-
"command": ["CMD-SHELL","agent health"],
28
-
"timeout": 5,
29
-
"interval": 30,
30
-
"startPeriod": 15
31
-
}
32
-
```
33
-
34
-
### Register the task definition
35
-
36
-
{{< tabs >}}
37
-
{{% tab "AWS Console" %}}
38
-
39
-
1. Log in to your [AWS Console][1] and navigate to (TBD: where?)
40
-
2. Select **Task Definitions** in the navigation pane. On the **Create new task definition** menu, select **Create new task definition with JSON**.
41
-
3. In the JSON editor box, paste the contents of your task definition file.
42
-
4. Select **Create**.
43
-
44
-
[1]: https://aws.amazon.com/console
45
-
{{% /tab %}}
46
-
47
-
{{% tab "AWS CLI" %}}
48
-
Use the [AWS CLI][1] to execute the following command:
49
-
50
-
```bash
51
-
(TBD: command)
52
-
```
53
-
[1]: https://aws.amazon.com/cli
54
-
{{% /tab %}}
55
-
{{< /tabs >}}
56
-
57
-
58
-
### Run the task as a replica service
59
-
60
-
{{< tabs >}}
61
-
{{% tab "AWS Console" %}}
62
-
1. Log in to your [AWS Web Console][1] and navigate to (TBD: where?)
63
-
2. Choose the cluster to run the Datadog Agent on.
64
-
3. On the **Services** tab, click **Create**.
65
-
4. For **Task Definition**, select the task created in the previous steps.
66
-
5. Enter a **Service name**.
67
-
6. For **Launch type**, choose **Capacity Provider** and select the Manged Instance capacity provider tied to the cluster.
68
-
7. For **Number of tasks**, enter `1`. Click **Next step**.
69
-
8. Fill in the rest of the optional fields based on your preference.
70
-
9. Click **Next step**.
71
-
10. Click **Create service**.
72
-
73
-
[1]: https://aws.amazon.com/console
74
-
{{% /tab %}}
75
-
76
-
{{% tab "AWS CLI" %}}
77
-
Use the [AWS CLI][1] to execute the following command:
78
-
79
-
```bash
80
-
(TBD: command)
81
-
```
82
-
83
-
[1]: https://aws.amazon.com/cli
84
-
{{% /tab %}}
85
-
{{< /tabs >}}
86
-
87
-
## Set up additional Datadog Agent features
88
-
89
-
### Metrics collection
90
-
91
-
To provide a custom integration configuration, you must mount a configuration file directly onto the Datadog Agent container.
92
-
93
-
**Example**: Setting up a Datadog Agent with custom configuration files mounted
94
-
95
-
Create the following file structure:
96
-
```
97
-
|- datadog
98
-
|- Dockerfile
99
-
|- conf.d
100
-
|-redis.yaml
101
-
```
102
-
103
-
The `redis.yaml` file contains the configurations for the [Redis][4] integration.
To collect traces over UDP, do not set `DD_AGENT_HOST`. Keep the default `localhost` value.
157
-
158
-
#### UDS
159
-
160
-
To collect traces over UDS:
161
-
1. Add an empty volume onto the task definition using the `volumes` parameter.
162
-
2. Mount the volume onto the agent and application container using the `mountPoints` parameter.
163
-
3. Configure the environmental variable `DD_DOGSTATSD_SOCKET` on the application container and set it to `/var/run/datadog/dsd.socket`.
164
-
165
-
**Example**: Container definitions that configure collecting traces over UDS
166
-
```
167
-
{
168
-
"containerDefinitions": [
169
-
{
170
-
"image": "datadog/agent:latest",
171
-
"mountPoints": [
172
-
{
173
-
"containerPath": "/var/run/datadog",
174
-
"readOnly": false,
175
-
"sourceVolume": "dd-sockets"
176
-
}
177
-
],
178
-
"name": "datadog-agent",
179
-
...
180
-
...
181
-
},
182
-
{
183
-
"environment": [
184
-
{
185
-
"name": "DD_DOGSTATSD_SOCKET",
186
-
"value": "/var/run/datadog/dsd.socket"
187
-
}
188
-
],
189
-
"mountPoints": [
190
-
{
191
-
"containerPath": "/var/run/datadog",
192
-
"readOnly": false,
193
-
"sourceVolume": "dd-sockets"
194
-
}
195
-
],
196
-
"name": "app",
197
-
...
198
-
...
199
-
}
200
-
],
201
-
...
202
-
"volumes": [
203
-
{
204
-
"host": {},
205
-
"name": "dd-sockets"
206
-
}
207
-
]
208
-
}
209
-
210
-
```
211
-
212
-
### Log collection
213
-
214
-
The setup for log collection is identical to the setup for log collection in ECS Fargate. Follow the instructions in the [ECS Fargate documentation][14]. These instructions give you the option to use either AWS FireLens in combination with Datadog's Fluent Bit output plugin, or the `awslogs` log driver.
215
-
216
-
### Process collection
217
-
218
-
You can monitor processes in Datadog by using the [Live Processes page][15]. To enable process collection, add the [`PidMode` parameter][16] in the task definition and set it to `task` as follows:
0 commit comments