fluent-plugins-nursery / fluent-plugin-systemd

This is a fluentd input plugin. It reads logs from the systemd journal.
Apache License 2.0
153 stars 43 forks source link

support for Fedora based systems? #92

Open stavrospassbase opened 3 years ago

stavrospassbase commented 3 years ago

Hi Team,

we are leveraging Fedora Core OS and want to gather systemd logs.

For some reason the plugin is not gathering logs. It is being added without issues though.

Same setup on Ubuntu based system and logs are gathered.


`<source>
   @type systemd
    tag log.sre.systemd
    path /var/log/journal 
    read_from_head true
  <storage>
    @type local
    path /var/tmp/fluentd/tail_position/systemd-cursor.json
  </storage>

  <entry>
    fields_strip_underscores true
    fields_lowercase true
  </entry> 
</source>
`

My first idea was that it was related to SELinux so I disabled it to test but still. Do you have any idea why it won't work. Fedora Core OS support for the plugin would be amazing.

b-a-t commented 1 year ago

That actually looks like a permission problem as stated in https://github.com/fluent-plugins-nursery/fluent-plugin-systemd#when-i-look-at-fluentd-logs-everything-looks-fine-but-no-journal-logs-are-read-

Journal files are, by default, owned and readable by the "systemd-journal" system group but are not writable. Adding a user to this group thus enables her/him to read the journal files.

I had the same on the initial deployment.