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

Example configuration issues with td-agent 3 #76

Closed jbye closed 5 years ago

jbye commented 5 years ago

Just wanted to let you know I had some issues getting this plugin to run with the config example because the fluentd config parser (td-agent 3) failed to parse the matches field.

To resolve the issue I had to escape the quotes, so my configuration ended up looking like this

matches "[{ \"_SYSTEMD_UNIT\": \"consul.service\" }]"

In addition, I had trouble getting the storage configuration used in the example to work. I was only able to get it running once I changed <storage in-systemd-consul> to <storage>.

errm commented 5 years ago

Thanks for the info ... you are indeed correct about the storage configuration...

For the matches config I think the problem is just because you are surrounding the config with quotes ...

matches [{ "_SYSTEMD_UNIT": "consul.service" }]

Should work as expected ...