Skip to content

Standardize on dd-agent for Docker container name #30621

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions content/en/agent/faq/log-collection-with-docker-socket.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ Ensure that the Docker socket (`/var/run/docker.sock`) is mounted into the Agent
For the following configuration, replace `<DD_SITE>` with {{< region-param key="dd_site" >}}:

```shell
docker run -d --name datadog-agent \
docker run -d --name dd-agent \
--cgroupns host \
--pid host \
-e DD_API_KEY=<DATADOG_API_KEY> \
-e DD_LOGS_ENABLED=true \
-e DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL=true \
-e DD_CONTAINER_EXCLUDE="name:datadog-agent" \
-e DD_CONTAINER_EXCLUDE="name:dd-agent" \
-e DD_SITE=<DD_SITE>
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-v /proc/:/host/proc/:ro \
Expand Down Expand Up @@ -96,4 +96,4 @@ For a Docker environment, the Agent receives container updates in real time thro
Since Agent v6.14+, the Agent collects logs for all containers (running or stopped). This means that short-lived container logs that have started and stopped in the past second are still collected, as long as they are not removed.

[1]: /containers/docker/log
[2]: /containers/kubernetes/log
[2]: /containers/kubernetes/log
28 changes: 14 additions & 14 deletions content/en/containers/docker/apm.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ Then start the Agent and the application container, connected to the network pre

```bash
# Datadog Agent
docker run -d --name datadog-agent \
docker run -d --name dd-agent \
--network <NETWORK_NAME> \
--cgroupns host \
--pid host \
Expand All @@ -190,7 +190,7 @@ docker run -d --name datadog-agent \
# Application
docker run -d --name app \
--network <NETWORK_NAME> \
-e DD_AGENT_HOST=datadog-agent \
-e DD_AGENT_HOST=dd-agent \
company/app:latest
```

Expand All @@ -201,7 +201,7 @@ Where your `<DATADOG_SITE>` is {{< region-param key="dd_site" code="true" >}} (d

```bash
# Datadog Agent
docker run -d --name datadog-agent \
docker run -d --name dd-agent \
--cgroupns host \
--pid host \
--network "<NETWORK_NAME>" \
Expand All @@ -213,18 +213,18 @@ docker run -d --name datadog-agent \
# Application
docker run -d --name app \
--network "<NETWORK_NAME>" \
-e DD_AGENT_HOST=datadog-agent \
-e DD_AGENT_HOST=dd-agent \
company/app:latest
```
Where your `<DATADOG_SITE>` is {{< region-param key="dd_site" code="true" >}} (defaults to `datadoghq.com`).

{{% /tab %}}
{{< /tabs >}}

This exposes the hostname `datadog-agent` in your `app` container.
This exposes the hostname `dd-agent` in your `app` container.
If you're using `docker-compose`, `<NETWORK_NAME>` parameters are the ones defined under the `networks` section of your `docker-compose.yml`.

Your application tracers must be configured to submit traces to this address. Set environment variables with the `DD_AGENT_HOST` as the Agent container name, and `DD_TRACE_AGENT_PORT` as the Agent Trace port in your application containers. The example above uses host `datadog-agent` and port `8126` (the default value so you don't have to set it).
Your application tracers must be configured to submit traces to this address. Set environment variables with the `DD_AGENT_HOST` as the Agent container name, and `DD_TRACE_AGENT_PORT` as the Agent Trace port in your application containers. The example above uses host `dd-agent` and port `8126` (the default value so you don't have to set it).

Alternately, see the examples below to set the Agent host manually in each supported language:

Expand All @@ -235,7 +235,7 @@ Alternately, see the examples below to set the Agent host manually in each suppo
Either update the Java Agent configuration with environment variables:

```bash
DD_AGENT_HOST=datadog-agent \
DD_AGENT_HOST=dd-agent \
DD_TRACE_AGENT_PORT=8126 \
java -javaagent:/path/to/the/dd-java-agent.jar -jar /your/app.jar
```
Expand All @@ -244,7 +244,7 @@ or through system properties:

```bash
java -javaagent:/path/to/the/dd-java-agent.jar \
-Ddd.agent.host=datadog-agent \
-Ddd.agent.host=dd-agent \
-Ddd.agent.port=8126 \
-jar /your/app.jar
```
Expand All @@ -257,7 +257,7 @@ java -javaagent:/path/to/the/dd-java-agent.jar \
from ddtrace import tracer

tracer.configure(
hostname='datadog-agent',
hostname='dd-agent',
port=8126,
)
```
Expand All @@ -268,7 +268,7 @@ tracer.configure(

```ruby
Datadog.configure do |c|
c.agent.host = 'datadog-agent'
c.agent.host = 'dd-agent'
c.agent.port = 8126
end
```
Expand All @@ -287,7 +287,7 @@ import (
)

func main() {
tracer.Start(tracer.WithAgentAddr("datadog-agent:8126"))
tracer.Start(tracer.WithAgentAddr("dd-agent:8126"))
defer tracer.Stop()
}
```
Expand All @@ -298,7 +298,7 @@ func main() {

```javascript
const tracer = require('dd-trace').init({
hostname: 'datadog-agent',
hostname: 'dd-agent',
port: 8126
});
```
Expand All @@ -317,7 +317,7 @@ export CORECLR_PROFILER_PATH=<SYSTEM_DEPENDENT_PATH>
export DD_DOTNET_TRACER_HOME=/opt/datadog

# For containers
export DD_AGENT_HOST=datadog-agent
export DD_AGENT_HOST=dd-agent
export DD_TRACE_AGENT_PORT=8126

# Start your application
Expand Down Expand Up @@ -358,7 +358,7 @@ To submit traces via socket, the socket should be mounted to the Agent container

```bash
# Datadog Agent
docker run -d --name datadog-agent \
docker run -d --name dd-agent \
--network <NETWORK_NAME> \
--cgroupns host \
--pid host \
Expand Down
4 changes: 2 additions & 2 deletions content/en/containers/docker/integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ You can store Autodiscovery templates as local files inside the mounted `/conf.d

**docker run**
```shell
docker run -d --name datadog-agent \
docker run -d --name dd-agent \
[...]
-v <PATH_TO_LOCAL_FOLDER>/conf.d:/conf.d \
```
Expand Down Expand Up @@ -336,4 +336,4 @@ For more examples, including how to configure multiple checks for multiple sets
[5]: /agent/guide/use-community-integrations/
[6]: /containers/guide/auto_conf
[7]: /containers/guide/ad_identifiers
[8]: /containers/guide/autodiscovery-examples
[8]: /containers/guide/autodiscovery-examples
14 changes: 7 additions & 7 deletions content/en/containers/docker/log.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ To run a [Docker container][1] that embeds the Datadog Agent to monitor your hos
For the following configuration, replace `<DD_SITE>` with {{< region-param key="dd_site" code="true">}}:

```shell
docker run -d --name datadog-agent \
docker run -d --name dd-agent \
--cgroupns host \
--pid host \
-e DD_API_KEY=<DATADOG_API_KEY> \
-e DD_LOGS_ENABLED=true \
-e DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL=true \
-e DD_CONTAINER_EXCLUDE="name:datadog-agent" \
-e DD_CONTAINER_EXCLUDE="name:dd-agent" \
-e DD_SITE=<DD_SITE> \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-v /var/lib/docker/containers:/var/lib/docker/containers:ro \
Expand All @@ -70,13 +70,13 @@ docker run -d --name datadog-agent \
### Windows
For the following configuration, replace `<DD_SITE>` with {{< region-param key="dd_site" code="true">}}:
```shell
docker run -d --name datadog-agent \
docker run -d --name dd-agent \
--cgroupns host \
--pid host \
-e DD_API_KEY=<DATADOG_API_KEY> \
-e DD_LOGS_ENABLED=true \
-e DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL=true \
-e DD_CONTAINER_EXCLUDE="name:datadog-agent" \
-e DD_CONTAINER_EXCLUDE="name:dd-agent" \
-e DD_SITE=<DD_SITE> \
-v \\.\pipe\docker_engine:\\.\pipe\docker_engine \
-v c:\programdata\docker\containers:c:\programdata\docker\containers:ro
Expand All @@ -88,14 +88,14 @@ Add the path `/opt/datadog-agent/run` under Docker Desktop -> Settings -> Resour

For the following configuration, replace `<DD_SITE>` with {{< region-param key="dd_site" code="true">}}:
```shell
docker run -d --name datadog-agent \
docker run -d --name dd-agent \
--cgroupns host \
--pid host \
-e DD_API_KEY=<DATADOG_API_KEY> \
-e DD_LOGS_ENABLED=true \
-e DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL=true \
-e DD_LOGS_CONFIG_DOCKER_CONTAINER_USE_FILE=true \
-e DD_CONTAINER_EXCLUDE="name:datadog-agent" \
-e DD_CONTAINER_EXCLUDE="name:dd-agent" \
-e DD_SITE=<DD_SITE> \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-v /var/lib/docker/containers:/var/lib/docker/containers:ro \
Expand All @@ -116,7 +116,7 @@ The commands related to log collection are:
`-v /opt/datadog-agent/run:/opt/datadog-agent/run:rw`
: To prevent loss of container logs during restarts or network issues, the last log line collected for each container in this directory is stored on the host.

`-e DD_CONTAINER_EXCLUDE="name:datadog-agent"`
`-e DD_CONTAINER_EXCLUDE="name:dd-agent"`
: Prevents the Datadog Agent from collecting and sending its own logs and metrics. Remove this parameter if you want to collect the Datadog Agent logs or metrics. This parameter value supports regular expressions.

`-v /var/run/docker.sock:/var/run/docker.sock:ro`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ If you're using the Docker containerized Agent, set the following environment va
Here's an example of how you can include these settings in your Docker run command:

```shell
docker run -d --name datadog-agent \
docker run -d --name dd-agent \
--cgroupns host \
--pid host \
-e DD_API_KEY=<DATADOG_API_KEY> \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ and mount it into `/conf.d/`. The file name can be anything:
Your Agent's Docker installation command should look like this:

```
docker run -d --name datadog-agent \
docker run -d --name dd-agent \
--cgroupns host \
--pid host \
-e DD_API_KEY=<DATADOG_API_KEY> \
Expand All @@ -140,7 +140,7 @@ docker run -d --name datadog-agent \

## Verification

After you have set this all up, you can deploy the Agent. You should be able to see something like the below when you run `docker exec -it datadog-agent agent status`:
After you have set this all up, you can deploy the Agent. You should be able to see something like the below when you run `docker exec -it dd-agent agent status`:

```
==========
Expand Down
4 changes: 2 additions & 2 deletions content/en/logs/guide/how-to-set-up-only-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ If you're using the Docker containerized Agent, set the following environment va
Here's an example of how you can include these settings in your Docker run command:

```shell
docker run -d --name datadog-agent \
docker run -d --name dd-agent \
--cgroupns host \
--pid host \
-e DD_API_KEY=<DATADOG_API_KEY> \
-e DD_LOGS_ENABLED=true \
-e DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL=true \
-e DD_CONTAINER_EXCLUDE="name:datadog-agent" \
-e DD_CONTAINER_EXCLUDE="name:dd-agent" \
-e DD_ENABLE_PAYLOADS_EVENTS=false \
-e DD_ENABLE_PAYLOADS_SERIES=false \
-e DD_ENABLE_PAYLOADS_SERVICE_CHECKS=false \
Expand Down
2 changes: 1 addition & 1 deletion content/en/tracing/guide/ignoring_apm_resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ For multiple values:
In your docker run command to spin up the Datadog Agent, add `DD_APM_IGNORE_RESOURCES`:

{{< code-block lang="shell" >}}
docker run -d --name datadog-agent \
docker run -d --name dd-agent \
--cgroupns host \
--pid host \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
Expand Down
Loading