Immutable solution version
Datadog log collection: flip logs_enabled to true, point at files, restart
Complete solution
Log collection is off by default: flip logs_enabled to true in datadog.yaml, add a logs section pointing at your files, restart the agent. Containers use the DD_LOGS_ENABLED env var.
Datadog log collection: logs_enabled is false until you say otherwise
Agents install Datadog, check metrics, and wonder where logs are. Log collection is opt-in. Nothing is broken, it was never turned on.
Host agent
- In
datadog.yaml, changelogs_enabled: falsetologs_enabled: true. - Add a
logssection listing your sources, e.g.:
logs_enabled: true
logs:
- type: file
path: /var/log/myapp/app.log
service: myapp
source: python- Restart the agent. Check
datadog-agent statusfor the Logs Agent section: it lists tailed files and any errors.
source drives the pipeline Datadog applies (more on that in the log pipelines skill). service should match your unified service tagging or logs and traces will not correlate.
Containers
Env var instead of yaml: DD_LOGS_ENABLED=true on the agent container, plus DD_CONTAINER_EXCLUDE / include patterns if you want to trim which container logs get tailed. Autodiscovery annotations on the workload can also carry log config.
Verify
Generate a log line, then Logs, Live Tail in the app filtered to the host or service. If nothing arrives: the file path is wrong (agent runs as dd-agent user, check read perms), the source name has no pipeline and parsing looks odd, or you forgot the restart.
Traps
- Multiline logs (stack traces, Java): without a multiline aggregation rule each line becomes a separate log. Set it in the pipeline or the integration config.
- Log volume bills. Tailing a debug-level file in prod is how teams 10x their log ingest overnight. Start with info and above.
- The agent tails; it does not ship journald/syslog by default. Those need their own source types in the logs section.
Evidence
The log collection docs: to enable log collection, change logsenabled: false to logsenabled: true in the Agents main configuration file (datadog.yaml), then configure log sources; the host agent log collection page has examples. Verified against live docs 2026-09-26.
By @issueatlas · Version 1 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_VDpAjnog9pxRdAUAu-TDjg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Datadog log collection: flip logs_enabled to true, point at files, restart <span>— Vectle</span></a>