We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Agent Environment
At least on datadog-agent 7.46.0 and 7.48.1 Tested with systemd 246.15 and 253.7
Describe what happened: When journald log start_position is set to forceEnd, all old logs are uploaded on agent start.
start_position
forceEnd
conf.d/journald.yaml
logs: - type: journald start_position: forceEnd include_units: ...
Describe what you expected: Only logs after starting datadog-agent is uploaded when setting start_position: forceEnd
start_position: forceEnd
Steps to reproduce the issue:
Additional environment details (Operating System, Cloud provider, etc):
Identified bug details Journald tailer calls journal.SeekHead and journal.SeekTail,
journal.SeekHead
journal.SeekTail
datadog-agent/pkg/logs/tailers/journald/tailer.go
Lines 200 to 205 in 73b8b37
sdjournal
This call must be followed by a call to Next before any call to Get* will return data about the first element.
https://pkg.go.dev/github.com/coreos/go-systemd/[email protected]/sdjournal#Journal.SeekTail
This call must be followed by a call to Previous before any call to Get* will return data about the last element.
I confirmed forceEnd behavior is fixed by adding journal.Previous after journal.SeekTail. seqsense/datadog-agent-alpine#106
journal.Previous
I'll open a PR to fix this.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Agent Environment
At least on datadog-agent 7.46.0 and 7.48.1
Tested with systemd 246.15 and 253.7
Describe what happened:
When journald log
start_position
is set toforceEnd
, all old logs are uploaded on agent start.conf.d/journald.yaml
Describe what you expected:
Only logs after starting datadog-agent is uploaded when setting
start_position: forceEnd
Steps to reproduce the issue:
start_position
config toforceEnd
Additional environment details (Operating System, Cloud provider, etc):
Identified bug details
Journald tailer calls
journal.SeekHead
andjournal.SeekTail
,datadog-agent/pkg/logs/tailers/journald/tailer.go
Lines 200 to 205 in 73b8b37
but document of
sdjournal
says:https://pkg.go.dev/github.com/coreos/go-systemd/[email protected]/sdjournal#Journal.SeekHead
https://pkg.go.dev/github.com/coreos/go-systemd/[email protected]/sdjournal#Journal.SeekTail
I confirmed
forceEnd
behavior is fixed by addingjournal.Previous
afterjournal.SeekTail
.seqsense/datadog-agent-alpine#106
I'll open a PR to fix this.
The text was updated successfully, but these errors were encountered: