Netdata Community

Web_log: support journald

Now that the web_log collector was rewritten in go, I wonder if it would be simple to use journald as a source.

This was already discussed 3 years ago for the Python version in Get logs from systemd-journald · Issue #1999 · netdata/netdata · GitHub, where it was dropped because of priorities and the difficulty of providing a single approach for all collectors.

But, since it was rewritten, perhaps adding journald support for streaming web log entries is trivial?

Hey, thanks for bringing this again to our attention. @ilyam8 what do you think?

I think that it would be not a big deal if there were a pure-go package that implements reading from journald.

We use coreos/go-systemd in the systemdunits collector.

It’s interesting:

  • writing to the Journal package is pure-go
  • reading from the Journal package is a wrapper around journald’s native C API (requires cgo and the journal headers to be available.).