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 customizing `pos_file` path #78

Closed qingling128 closed 5 years ago

qingling128 commented 5 years ago

[Problem] When specifying a customized pos_file for in_systemd plugin, the value gets ignored.

[Version] gem 'fluent-plugin-systemd' version '1.0.2'

[Config]

  <source>
    @type systemd
    filters [{"_SYSTEMD_UNIT":"docker.service"}]
    pos_file /var/log/k8s-gcp-journald-docker.pos
    read_from_head true
    tag "docker"
  </source>

[Warnings in the log]

2019-07-25 16:22:39 +0000 [warn]: parameter 'pos_file' in <source>
  @type systemd
  filters [{"_SYSTEMD_UNIT":"docker.service"}]
  pos_file /var/log/k8s-gcp-journald-docker.pos
  read_from_head true
  tag "docker"
</source> is not used.
qingling128 commented 5 years ago

Ah, in fact this is out-of-date. I think I just need to use https://docs.fluentd.org/storage.

errm commented 5 years ago

Yes with the current version of the plugin you can just use any storage plugin