I am attempting to use core/fluentd to capture the Habitat Supervisor logs to do… something… with them.
I am appending gem 'fluent-plugin-systemd' to the core plan.sh so that I can use the systemd source type in fluentd, as below:
<source>
@type systemd
tag hab-sup
path /var/jog/journal
match [{ "_SYSTEMD_UNIT": "hab-sup-default.service" }]
read_from_head true
</source>
When loading my fluentd service, I am seeing an error:
Jun 08 15:57:32 aup1.tmeu.eunstg1.websys.tmcs hab[538]: fluentd.default(O): /hab/pkgs/tm/fluentd/1.0.2/20180608143101/vendor/bundle/ruby/2.4.0/gems/ffi-1.9.25/lib/ffi.rb:6:in `require': libffi.so.6: cannot open shared object file: No such file or directory - /hab/pkgs/tm/fluentd/1.0.2/20180608143101/vendor/bundle/ruby/2.4.0/gems/ffi-1.9.25/lib/ffi_c.so (LoadError)
I’m going to take a look at this today. I’ve got a couple things I need to finish up this morning but then I’ll see if I can’t help get you unblocked here!
Yeah I think @epcim is correct. To start you’re going to need to take a runtim dep on core/libffi . That being said, testing this locally does get us past this initial error but i’m testing in a studio where systemd doesn’t exist and it bombs out the moment that systemd libraries get accessed. Can you give this a shot and let me know what you see?