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

Deploy OneAgent as a container

alejandro_guira
Newcomer

Is there any way to deploy OneAgent as a container? We have tried but it seems not to be able to monitor other containers. If it's not currently possible, is this feature part of the roadmap?

Our policy is try to avoid the installation of anything more than the Docker engine in the dockerhost, and currently other monitoring solutions deploy their agent inside containers. That feature is basic for us.

Thanks!

4 REPLIES 4

ops1
Newcomer

We would also like to know the same. More specifically, can we use Dynatrace to monitor container-centric hosts, such as CoreOS, RancherOS, Atomic, etc.? These projects assume everything is running in a container, and do not even provide a package manager.

Edit: I did find https://hub.docker.com/r/dynatrace/oneagent/, but the dockerized agent doesn't seem to be working - none of my hosts or applications are showing up in Dynatrace.

Tomasz_Gajger
Dynatrace Pro
Dynatrace Pro

Hi Eugene,

the supported way of deploying OneAgent as a docker container is described on our help pages, it is a more detailed version of what is available on the Docker Hub:
https://help.dynatrace.com/infrastructure-monitoring/containers/how-do-i-deploy-dynatrace-as-docker-container/

This method works by installing OneAgent directly on the host and launching the agent as a process inside a privileged container.
For container optimized OSes it is often the case that most of the filesystem is read-only, including /opt, to which agent deploys its binaries.
In such case the installation won't work, there is a requirement for both /opt and /var to be rw accessible.

As far as CoreOS is concerned, it is supported with default configuration of SELinux (permissive mode), for more information regarding supported platforms please refer to:
https://help.dynatrace.com/get-started/reference/which-environments-and-versions-does-dynatrace-support/

If deployment via docker container does not work for you under CoreOS then please open a ticket on our support portal:
https://www.dynatrace.com/support/contact-support/

Regards,
Tomasz

ops1
Newcomer

Thanks for the reply, @Tomasz G. Could you clarify what you mean by "...installing OneAgent directly on the host and launching the agent as a process inside a privileged container"? I am launching it as a privileged container with all the correct mappings and capabilities, as per instructions in the link you posted, as well as on DockerHub. I am not installing it on the host directly though, as that would defeat the purpose of containerizing it. Have not tried on CoreOS yet - just trying this on Ubuntu so far. Let me know please if I've misunderstood the instructions and the agent does need to be running both *on the host* and *in the container*; I will open a ticket otherwise. Thank you!
- Eugene

Tomasz_Gajger
Dynatrace Pro
Dynatrace Pro

Hi once again,

you have understood the instructions correctly, the agent mustn't run on the host and in the container at the same time, our installer would not allow such deployment.

"...installing OneAgent directly on the host and launching the agent as a process inside a privileged container"
I meant that despite running in the container all of the oneagent files are actually placed on the host's filesystem, not in a filesystem of the container.

Have you tried looking at the logs produced by the container? If the installer detected a problem with an environment, for example lack of disk space, it would print such information to the console.
You can inspect the logs by running
$ docker logs <CONTAINER ID>

Furthermore, docker running on Ubuntu is fully supported by our image, so I would advise to open a ticket on our support portal just as I have mentioned earlier.
When opening a ticket please attach the output of docker logs and zipped archive with contents of /opt/dynatrace/oneagent/log/* directory, it will speed up the analysis of this issue.

Regards,
Tomasz