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

How to use this plugin via fluentd docker? #61

Closed kevdowney closed 6 years ago

kevdowney commented 6 years ago

I have tried to run fluentd-plugin-systemd via a docker, but it is not able to find systemd (dependency failures).

Is there a way for this plugin to work via the docker container?

errm commented 6 years ago

Hi @kevdowney thanks for your question...

It is possible to use this plugin within a docker container... you just need to have the correct dependencies installed.

On Debian/Ubuntu you need to install the libsystemd0 package. On CentOS (and RHEL I would imagine) you need to remove the fakesystemd package and install systemd

We already have a small note mentioning this here https://github.com/reevoo/fluent-plugin-systemd#dependencies but improving the documentation is a big goal for the plugin now...

Let me know if the above helps solve your issue so I can update the documentation to be more useful.

emacski commented 6 years ago

While it might be a little out of date, I use this plugin in a fluentd / elasticsearch docker implementation for kubernetes with the ability to handle shipping container logs as well as the host's systemd logs.

You can find the fluentd container source here: https://github.com/emacski/k8s-fluentd which also includes a functional k8s DaemonSet example for the container which can be used to extract the options for running the container in docker stand-alone if necessary.

Just throwing it out there if that helps at all.

errm commented 6 years ago

Thanks @emacski looks like an exemplary setup ...

The main community maintained example is this https://github.com/fluent/fluentd-kubernetes-daemonset