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

Make Syslog parser/processor handle errors more gracefully #31246

Closed
taylor-swanson opened this issue Apr 11, 2022 · 1 comment · Fixed by #31798
Closed

Make Syslog parser/processor handle errors more gracefully #31246

taylor-swanson opened this issue Apr 11, 2022 · 1 comment · Fixed by #31798

Comments

@taylor-swanson
Copy link
Contributor

The new Syslog parser and processor added in 8.2 is too strict and ends up throwing away any parsed data if an error occurs. The original assumption was that if an error occurred, it meant that the message was unusable. While this may be true if the error was an early EOF (message was truncated), a lot of other errors tend to occur due to subtle variations in adherence to RFCs. There is still a lot of value in providing the data parsed, even if it's incomplete.

The behavior should be changed so that if an error is encountered, parsing continues as best it can and whatever data is extracted is still passed on to the user. This will require some changes to the parsing logic in the Ragel files to ensure that best effort parsing is being done, rather than exiting early if an error is encountered. The decode_cef processor from x-pack/filebeat uses a similar mechanism and could be used a as a guide for this change.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants