Closed ogis-yamazaki closed 1 year ago
I'm not familiar with journal namespaces, but the path
option specifies the directory, so it might be possible to set up two plugins to collect each data if the directories are separated.
The path
option is passed to Systemd::Journal
's path
.
It seems to be passed to sd_journal_open_directory
.
If we can open them as separate directories, we might be able to do that.
@daipom
Thank you.
In my environment, I have been specifying /var/log/journal for the path option. It might be possible to refer to the journal in two places by specifying an absolute path including machine ID in the path option. I will experiment.
It would be easier if the problem could be solved by simply specifying the parent directory.
I verified it and report that it worked.
My environment has two journals as follows
$ pwd
/var/log/journal/ec27f1ab87d25a7c63d1c9af177d59d7
$ ls -l
total 20
drwxr-sr-x+ 2 root systemd-journal 16384 May 18 16:42 ec27f1ab87d25a7c63d1c9af177d59d7
drwxr-sr-x+ 2 root systemd-journal 4096 May 18 16:35 ec27f1ab87d25a7c63d1c9af177d59d7.broker
As an experiment, I changed the path options as follows
from
path /var/log/journal
to
path /var/log/journal/ec27f1ab87d25a7c63d1c9af177d59d7.broker
I was able to track my journal using the namespace.
thank you.
Thanks for your report! I'm glad to hear that!
I'm using the systemd-journald namespace.
[Journal Namespaces] https://www.freedesktop.org/software/systemd/man/systemd-journald.service.html#Journal%20Namespaces
I have prepared a namespace with the name broker.
So I have two journals in /var/log/journal as follows
Does the plugin support more than 2 journals?