Code Monkey home page Code Monkey logo

Comments (4)

daipom avatar daipom commented on June 16, 2024 1

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.

https://github.com/fluent-plugin-systemd/fluent-plugin-systemd/blob/9ffe8e14de75ca94e9bfe7428efd5c1a59421511/lib/fluent/plugin/in_systemd.rb#L78

It seems to be passed to sd_journal_open_directory.

https://github.com/ledbettj/systemd-journal/blob/2f5d259116a5e759311ff16097aadcb48e1989c7/lib/systemd/journal.rb#L232-L252

If we can open them as separate directories, we might be able to do that.

from fluent-plugin-systemd.

ogis-yamazaki avatar ogis-yamazaki commented on June 16, 2024 1

@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.

from fluent-plugin-systemd.

daipom avatar daipom commented on June 16, 2024 1

Thanks for your report!
I'm glad to hear that!

from fluent-plugin-systemd.

ogis-yamazaki avatar ogis-yamazaki commented on June 16, 2024

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.

from fluent-plugin-systemd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.