Dynatrace log monitoring supports the collection of logs from non-orchestrated Docker environments via OneAgent. To learn more about log monitoring in orchestrated platforms, such as Kubernetes and OpenShift, that use Docker as the Container Runtime Interface (CRI), see Log Monitoring in Kubernetes.
OneAgent autodiscovers log messages written to the containerized application's stdout
/stderr
streams. The Docker logging driver saves these log streams in a file located in the /var/lib/docker/containers
directory on the host running the containers. OneAgent autodiscovers log files from that path.
OneAgent does not discover logs written directly to the container's file system.
Requirements for autodiscovery of Docker logs:
json-file
logging driver.stdout
/stderr
streams./var/lib/docker/containers
exists for a minimum of one minute after container execution is finished.As OneAgent discovers logs from the /var/lib/docker/containers
path on a host running in a non-orchestrated Docker environment, it connects specific logs to a corresponding container based on the container ID from the file path.
In addition, OneAgent enhances these logs with the following Docker metadata:
container.name
container.id
container.image.name