Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

in_syslog support for RFC5424 Octet Counting / MSG-LEN header for tcp connections #1679

Closed
guedressel opened this issue Aug 30, 2017 · 9 comments
Labels
feature request *Deprecated Label* Use enhancement label in general

Comments

@guedressel
Copy link

guedressel commented Aug 30, 2017

While testing the in_syslog plugin to receive syslog messages generated by syslog-ng via a TCP connection I stuck with "that stupid integer at beginning of each message".

Example log message

119 <139>1 2017-08-30T14:09:39+00:00 my-host app-name 34 - [meta sequenceId=\"1\"] [autoindex:error] Some logging message...

After some reading I discovered that the leading integer is described here: https://tools.ietf.org/id/draft-gerhards-syslog-plain-tcp-12.html#rfc.section.3.4.1

What do you think about adding this (optional?) detail to the syslog parser?

@guedressel
Copy link
Author

Does this Octet-Counting information relate to multi-line messages?

@guedressel
Copy link
Author

There's another discussion about that integer: Graylog2/graylog2-server#159

@repeatedly
Copy link
Member

Is this format supported by only syslog-ng?

@guedressel
Copy link
Author

Not sure which systems support that format. We are using syslog-ng exclusively in our infrastructure.
But since it is also part of the older RFC3164 I suppose there are more systems out there using it...

It's main benefit might be to have multiple messages being sent over a single TCP connection without relying on "newlines" as message delimiter; hence allowing multi-line messages to be sent as stream.

@repeatedly
Copy link
Member

Yeah, using Octet Counting seems better than \n delimited message frame, so supporting it is no problem for me.

Patches are welcome :)

@repeatedly repeatedly added the feature request *Deprecated Label* Use enhancement label in general label Sep 5, 2017
@salsa-dev
Copy link

salsa-dev commented Feb 15, 2018

@guedressel how did you solve this issue?

I resolved this issue for myself by using network driver in syslog-ng:
destination d_fluentd { network("10.1.1.7" port(5140) flags(syslog-protocol));};
and using message_format rfc5424 option to configure fluentd.

P.S.: for anyone bumping this issue

@sepich
Copy link

sepich commented Aug 5, 2018

We've investigated switching from rsyslog to fluentd,
and lack of support of messages with newlines for in_syslog is a showstopper for us.
Whole this famous java multiscreen stacktrace strips to just first line, when sent via syslog to fluentd.
Please note that "ancient" rsyslog even had $EscapeControlCharactersOnReceive off and sending multiline messages via syslog is correctly supported by "new" apps like graylog and splunk without any special configuring.
Please prioritise this, as for now in_syslog is sorta broken.
Also related: #1270

@gmile
Copy link
Contributor

gmile commented Sep 13, 2018

I'm working on draining logs from heroku to fluentd. Just discovered that Heroku frames all log messages according to syslog TCP protocol octet counting framing method.

Examples (see "HTTPS Drains"):

83 <40>1 2012-11-30T06:45:29+00:00 host app web.3 - State changed from starting to up
119 <40>1 2012-11-30T06:45:26+00:00 host app web.3 - Starting process with command `bundle exec rackup config.ru -p 24405`

Would love to see support for this from fluentd.

@repeatedly
Copy link
Member

Patch is here: #2147

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request *Deprecated Label* Use enhancement label in general
Projects
None yet
Development

No branches or pull requests

5 participants