Skip to content
New issue

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

pkg/promtail: remove journal target forced path #1298

Merged

Conversation

rfratto
Copy link
Member

@rfratto rfratto commented Nov 20, 2019

The forced default path for the journal target (/var/log/journal) did not apply to all Linux systems: systemd actually defaults to reading from two default paths: /var/log/journal and /run/log/journal. Not setting an explicit default will enable both of those paths to be searched for journal logs.

The comment mentioning the local machine ID was technically accurate, but is normally dealt with by bind mounting /etc/machine-id. That's the standard approach for running fluent-bit in a container, and should be the standard approach for Promtail as well.

Fixes #1286.

The forced default path for the journal target (/var/log/journal) did
not apply to all Linux systems: systemd actually defaults to reading
from _two_ default paths: /var/log/journal and /run/log/journal. Not
setting an explicit default will enable both of those paths to be
searched for journal logs.

The comment mentioning the local machine ID was technically accurate,
but is normally dealt with by bind mounting /etc/machine-id. That's the
standard approach for running fluent-bit in a container, and should be
the standard approach for Promtail as well.

Fixes grafana#1286.
@rfratto rfratto force-pushed the remove-explicit-default-journal-path-promtail branch from 956fba2 to 46e5305 Compare November 25, 2019 21:17
@rfratto rfratto marked this pull request as ready for review November 25, 2019 21:18
Copy link
Member

@sh0rez sh0rez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks cool, having one question tho

pkg/promtail/targets/journaltarget.go Show resolved Hide resolved
@rfratto rfratto merged commit 715f215 into grafana:master Nov 25, 2019
@rfratto rfratto deleted the remove-explicit-default-journal-path-promtail branch November 25, 2019 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support systemd without files
2 participants