-
Notifications
You must be signed in to change notification settings - Fork 63
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
parse_syslog follows RFC 5425 even with empty structured data, lacking key-value pairs. #1043
Comments
Hi @itkovian ! Thanks for opening this. I might be missing something, but it looks like your input is actually RFC5424 and not RFC3164:
You can tell because it has the |
Yes, the example comes from the tests in your code :) The problem I am facing is that several applications are logging lines like
And these lack a
This is correct according to the RFC 5424 as I understand, but I'd like to be able to force it to RFC 3164 instead of 5424. |
Can you post exactly what you would like the resulting message to look like. I think it should be fairly easy to add an extra parameter, but need to make sure it would do what you want. |
Sure. I'd like it to match the RFC 3164, resulting in
If you can tell me where in the code I should start looking, I can have a try myself. |
Cool. The relevant call is here. Currently it passes You will need to add an optional parameter here. Make it default to Have a look at the Any questions give me a shout. |
Hmm, I see that syslog_loose also tries to get some structured data for RFC3164, even though this should not be supported (calling structured_data_optional(false) here) I opened an issue for this: StephenWakely/syslog-loose#37 |
We're getting a bit of junk when processing syslog lines from several applications that implement the old syslog format (RFC 3164) but are actually putting something in
[]
without key-value pairs.I see in the tests that
I am wondering if this is actually the expected behaviour. What would be the rationale behind having empty structured data? Is it not more logical that these kinds of messages actually follow RFC 3164 instead of RFC 5424?
An empty structured message with information that varies wildly (e.g., a job ID (from slurm), some GC time (from Kafka)) means that the data that is shipped off to e.g. Elasticsearch will pollute the fields, as the object key may be interpreted as a fieldname with dynamic mapping turned on.
Is there a way to control this behaviour?
The text was updated successfully, but these errors were encountered: