Plugin @id or path for <storage> required when 'persistent' is true
Globegitter opened this issue · 3 comments
Globegitter commented
I have a config like:
<source>
@type systemd
filters [{ "_SYSTEMD_UNIT": "kubelet.service" }]
pos_file /var/log/gcp-journald-kubelet.pos
read_from_head true
tag kubelet
@id in-systemd-kubelet
<storage>
@type local
@id in-systemd-kubelet-storage
persistent true
</storage>
</source>
and getting the following error:
2017-09-13 09:18:25 +0000 [error]: config error file="/etc/fluent/fluent.conf" error_class=Fluent::ConfigError error="Plugin @id or path for <storage> required when 'persistent' is true"
If I remove the @id
from the storage section and add the path
it all works fine.
errm commented
If you set persistent true it is required to give a path to the file used to store the cursor...
A working example is given in the README
, could you explain what you expect to happen with this configuration? since it just looks invalid to me.
cosmo0920 commented
How about the following configurations?
Because storage plugin does not handle file path with @id
.
Instead we can specify it storage directive's attributes.
<source>
@type systemd
filters [{ "_SYSTEMD_UNIT": "kubelet.service" }]
pos_file /var/log/gcp-journald-kubelet.pos
read_from_head true
tag kubelet
@id in-systemd-kubelet
<storage in-systemd-kubelet-storage>
@type local
persistent true
</storage>
</source>
Globegitter commented
@errm I was just confused because of the error message saying @id or path
so I expected I was able to set @id
but @cosmo0920 gave the answer it seems - thanks :)