DataDog/docker-dd-agent

Even with DD_LOGS_STDOUT=true the agent logs to the container filesystem

wheelybird opened this issue · 2 comments

Hello. We find that with DD_LOGS_STDOUT=true there are several logs that are logged to /var/log/datadog within the container. Even though these are rotated nightly, as the container is using an overlay filesystem the size of the overlay volume steadily grows.
This is problematic for some of our smaller cloud instances that aren't configured with large amounts of disk space.

Would it be possible to redirect those logs to STDOUT instead of logging to the filesystem?

@wheelybird try setting DD_LOGS_STDOUT to yes instead of true.

I think this is what you need.

in a non-container environment, this is located at /etc/datadog-agent/datadog.yaml

2 options for k8s / helm:

  • use DD_LOG_TO_CONSOLE environment variable (value key: datadog.env)
  • add log_to_console: true to datadog.agents.customAgentConfig and make sure datadog.agents.useConfigMap is set to true.