This project contains files for building and running the Dynatrace Agent component of the Dynatrace Application Monitoring enterprise solution for deep end-to-end application monitoring in Docker. Ready-made images are available on the Docker Hub. Please refer to the Dynatrace Agent Examples project for exemplary integrations into Dockerized application processes.
TL;DR: you can quickly spawn a dynatrace/agent
instance with an anticipated default configuration by invoking:
docker-compose up
The run-container.sh
script runs a Docker container using docker run
and additionally shows by example how the dynatrace/agent
Docker image can be effectively configured at runtime. Please make sure to validate these settings to match your environment, as described below:
You can override the default configuration by providing the following environment variables to the script:
Environment Variable | Defaults | Description |
---|---|---|
DT_AGENT_NAME | "dtagent" | A name that applies to both the agent and the container instance. |
DT_AGENT_HOST_LOG_DIR | "/tmp/log/${DT_AGENT_NAME}" | A directory on the host the agent logs shall be mapped to. |
DT_AGENT_COLLECTOR | n/a | An optional "host:port" combination to a Dynatrace Collector. A Dynatrace Collector running in Docker will be auto-discovered if the application container which has the agent applied links to the collector container via --link dtcollector . |
Creates a Dockerized Dynatrace Agent instance named dtagent
:
./run-container.sh
Creates a Dockerized Dynatrace Agent instance named java-agent
:
DT_AGENT_NAME=java-agent ./run-container.sh
Docker Compose is a tool for defining and running multi-container applications, where an application's services are configured in docker-compose.yml
files. Typically, you would run an application via docker-compose [-f docker-compose.yml] up
.
While running applications via Docker Compose can be convenient, configuration comes with a drawback: the appreciation of environment variables from the compose host in docker-compose.yml
files has only been added in Docker 1.9. Unfortunately, this doesn't allow you to selectively override sensible defaults in these files from the environment as yet, but instead requires you to specify them each time you run docker-compose
. Therefore, while we wait for better support from Docker, the docker-compose.yml
file in this project comes with a static default configuration.
Creates a Dockerized Dynatrace Agent instance named dtagent
:
docker-compose up
While we strongly recommend using our ready-made images on the Docker Hub, you can build your own by executing build-image.sh
.
See the following Dockerized Dynatrace components and examples for more information:
This offering is Dynatrace Community Supported. Feel free to share any problems, questions and suggestions with your peers on the Dynatrace Community's Application Monitoring & UEM Forum.
Licensed under the MIT License. See the LICENSE file for details.