The home of Dockerized components of the Dynatrace Application Monitoring enterprise solution. All components are available on the Docker Hub.
Dynatrace Application Monitoring, with its PurePath technology, is the world's leading application monitoring solution - trusted by more than 7500 customers around the globe. It supports all your major technology stacks and integrates into your Continuous Delivery pipelines to allow you to build world-class, high-quality software.
If you are looking for monitoring containerized applications in dynamic Docker environments, please visit Dynatrace SaaS Docker monitoring.
By default, we use root user for running containers. It is a bad practice so, if you can, you should run them as non-root. Go to the Running Dynatrace Appmon containers as non-root
paragraph for running and configuration instructions.
If you don't need to use a non-root or dedicated user to run Dynatrace Appmon docker containers, you can quickly bring up an entire Dockerized Dynatrace AppMon environment by using Docker Compose with any of the provided docker-compose.yml
files like so :
git clone https://github.com/Dynatrace/Dynatrace-AppMon-Docker.git
cd Dynatrace-AppMon-Docker
docker-compose up -d
This will install and run all Appmon services like Server, Collector and Master Agent in daemon mode in single containers joined the same subnetwork. Then, you can install your Agents (see Configuration part for further details). In order to browse logs produced by these services you can use:
docker-compose logs -f
For the security reasons, as Docker co-uses the host kernel, all Dynatrace Appmon services are recommended to be run as non-root user. Therefore, you should operate on dedicated user on your host machine and set CUID
(User ID) and CGID
(Group ID) variables in .env
file for your user. By default it uses root. During image builds, user with the same ids will be created and used for running containers.
After you change user/group id variables, you may run Dynatrace Appmon in two ways:
- executing
run-as-nonroot.sh
script as dedicated user. This user should be able to run docker services (he should be added to the docker group). Example:./run-as-nonroot.sh -f docker-compose-debian.yml -b
, where-b
states for docker-compose's--build
or
- running
docker-compose up
after making sure that host directories forDT_SERVER_LOG_PATH_ON_HOST
,DT_COLLECTOR_LOG_PATH_ON_HOST
andDT_AGENT_LOG_PATH_ON_HOST
are created and ownerships are set to your dedicated user. Otherwise logs will not be available for you on host machine and/or some service might not run due to permission denied error.
Configuration relies on supplying docker-compose
with environment variables defined in .env
file. Some .env files variables need to be passed to Dockerfile
via ARG
for correct building component images, that's way it is recommended to change variables only from .env
file.
Ports can be also configured in .env file. By default it uses values from Communication Connections Documentation.
Master Agent (dtagent
) service only prepares required libraries and installation scripts for triggering agents. Running and configuring agents is manual action done by the user. Examples are here.
If you are not familiar with Appmon Agents concept, please read: Agents Overview, Agents Installation, Agents Configuration
If you don't want to validate CA certificate for curl commands, you may want to initialize CURL_INSECURE
variable to any value for image build.
Please see each component's README file for more specific details about configuration.
The example above leaves your Dynatrace AppMon environment without a proper license. However, you can add your license by editing .env file and put it as value for DT_SERVER_LICENSE_KEY_FILE_URL variable.
Also, you can conveniently have a license provisioned at container runtime by specifying a URL to a Dynatrace License Key File in the DT_SERVER_LICENSE_KEY_FILE_URL
environment variable. If you don't happen to have a web server available to serve the license file to you, Netcat can conveniently serve it from your command line, exactly once, via nc -l 1337 < dtlicense.key
, where 1337
is an available port on your local machine. A sudo
may be required depending on which port you eventually decide to choose.
git clone https://github.com/Dynatrace/Dynatrace-Docker.git
cd Dynatrace-Docker
DT_SERVER_LICENSE_KEY_FILE_URL=http://$YOUR_IP:1337 docker-compose up
In the example above, you have to let DT_SERVER_LICENSE_KEY_FILE_URL
point to a valid Dynatrace AppMon License Key file. If you don't have a license yet, you can obtain a Dynatrace AppMon Free Trial License here. However, you don't need to have your license file hosted by a server: if you can run a console, Netcat can conveniently serve it for you on port 80
via sudo nc -l 80 < dtlicense.key
.
Performance Clinic - Agents Performance Clinic - Collector
See the following integrations for more information:
Want to see all your Docker Metrics in one place? See the Dynatrace Docker Monitor Plugin for more information.
When running Docker on Windows or a Mac via the Docker Toolbox, make sure your Docker Machine has sufficient resources available to run Dynatrace AppMon together with your Dockerized application:
- Stop the Docker Machine in VirtualBox
- Give your Docker Machine at least 2 CPUs
- Give your Docker Machine at least 4 GB of RAM
- Finally, start your Docker Quickstart Terminal for the changes to take effect.
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.