receive messages from journald #23
Labels
No labels
bug
circologctl
doc
duplicate
enhancement
help wanted
invalid
question
security
syslog
wontfix
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: boyska/circolog#23
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Many distros use systemd-journald as main syslog. Receiving messages from it is a valuable thing to do.
To do that, a user just needs to bind to
/run/systemd/journal/syslog
. The problem is a misinterpretation of the message formats, leading to wrong parsing.See https://git.lattuga.net/boyska/circolog/src/master/cmd/circologd/main.go#L46
instead of
syslog.Automatic
, user should be able to force a certain input format(or is it "just" a bug in syslog.Automatic? perhaps it's worth reporting to gopkg.in/mcuadros/go-syslog.v2 maintainers)
I prepared a branch with an ad-hoc commit. Still not tested (and no test written).
https://git.lattuga.net/boyska/circolog/src/set-syslog-fmt
here are some random notes to test inside a clean debian container:
some more material
here is a line generated by journald
and here is one generated by
logger --rfc3164
(as provided by util-linux)I think the only difference is the presence of the hostname. So I wonder if that's really required by rfc3164, and whether the bug is therefore in
go-syslog.v2
or injournald
I can confirm that now the messages received from
journald
are correctly parsed. In a debian stable vm, I did:Then I started
circologd
, forcing the format:Listening with
circolog-tail
I got:Restarting
circologd
withlog-fmt
set to auto:The same experiment above works smoothly: