Open jstaffans opened 4 years ago
We are seeing the same issue. Is the intention of the journald log driver to only have a single config? If so, that is not mentioned anywhere in the docs and should be called out.
We also ran into this issue. Took quite a while to figure out that only the first entry is being picked up. This is especially annoying as we cannot change the source, service and sourcecategory per unit when constrained to using include_units
for. a single journald config.
FYI, you can create a symlink to /var/log/journal
and point the path
variable at it to make this work for an arbitrary number of services.
For anyone coming to this in the future: I was able to resolve this issue in Datadog agent 7.41.0+ (released Dec 2022, see changelog) by following the instructions to add a unique config_id
to each journald block:
https://docs.datadoghq.com/integrations/journald/?tab=host#tailing-the-same-journal-multiple-times
logs:
- type: journald
config_id: my-app1
source: my-app1
service: my-app1
include_units:
- my-app1.service
- type: journald
config_id: my-app2
source: my-app2
service: my-app2
include_units:
- my-app2.service
I have two separate configuration blocks for journald logs, because I want to give them separate
service
tags:Note that we are now falling back to "default" here.
In this scenario, logs from app2 are never collected.
datadog-agent status
shows:As a workaround, I can specify
path: /var/log/journal
for app2. So it seems that the problem is that you can't have two journald input configurations with the same input path configuration (be it a user-defined path, ordefault
).datadog-agent version