cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

This product reached the end of support date on March 31, 2021.

Monitoring docker containers with dockerized dynatrace agent

schennakesavula
Newcomer

@Martin E.

I am looking for some guidance on monitoring docker containers with dockerized dynatrace agent. The collector and server are on-prem.

I added following service to docker-compose.yml that has a dockerized java application.

myJavaApp:
image: myJavaAppImg
container_name: myJavaApp

ports:

- "8081:8080"

volumes_from:

- dtagent
environment:

- JAVA_OPTS="-agentpath:/dynatrace/agent/lib64/libdtagent.so=name=dtagent_myJavaApp,server=dtqacollector:9996"

dtagent:
container_name: "dtagent"
hostname: "docker-dtagent"
image: "dynatrace/agent:6.3"
environment:
DT_AGENT_NAME: "dtagent_myJavaApp"
volumes:
- /dynatrace
- "/tmp/log/dynatrace/agents/dtagent:/dynatrace/log/agent"
3 REPLIES 3

Mike_L
Dynatrace Pro
Dynatrace Pro

Hi Sathish,

Did you have a look at our Github page already? It has a few examples of how to get it up and running.

I also don't really see a question in your post, what isn't working?

https://github.com/Dynatrace/Dynatrace-Docker

Mike

schennakesavula
Newcomer

@Michael L.Thanks Michael. Yes, I looked at the examples. My question is that how to connect a dockerized dynatrace agent to an on-prem collector running outside of docker.

I assume this is waaaaay too late, but I had the same question today...turns out it's quite simple actually, just change the DT_COLLECTOR_NAME=dtcollector in the .env file to the hostname/ip of the non-Docker Collector i.e. DT_COLLECTOR_NAME=MY-LAPTOP

At least, that's how I got it to work, although it was all on my local laptop (MY-LAPTOP) and a VM (LAB-VM) running Ubuntu + Docker containers.