Collect journals from containers as well as the host

When journal_paths is empty the function sdJournal.NewJournal()
is used to open the journal for the host system only.

A single entry in journal_paths is opened with
sdJournal.NewJournalFrom[Dir|Files](), and multiple entries are opened
only with sdJournnalFromFiles().

Adding a single entry of /var/log/journal in the config file causes
all journal files under that directory to be opened, rather than only
that of the host system.

Change-Id: Ib758407edebff6786bf64fcf95328fb89912e3f6
This commit is contained in:
Jonathan Rosser 2018-07-05 16:49:36 +01:00
parent 57b618bbc2
commit b0654ee8e5

View File

@ -68,7 +68,7 @@ journalbeat:
# If you want to open Journal from directory just pass an array consisting of one element
# representing the path. See: https://www.freedesktop.org/software/systemd/man/sd_journal_open.html
# By default this setting is empty thus journalbeat will attempt to find all journal files automatically
#journal_paths: ["/var/log/journal"]
journal_paths: ["/var/log/journal"]
#default_type: journal