-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Filebeat] Kafka input, json payload #26833
Conversation
…ut vs string with json
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
@mjmbischoff We have an Filebeat wide initiative to expose the same parsers in all inputs like we have in log/filestream: multiline, json and container tracked here: #26130 Do you mind looking into it and implementing the support for the input? We want to have a uniform parsing experience for all Filebeat inputs, so I am afraid this PR cannot go in as is. |
Still on my radar, looking into implementing based on parsers. Do hit some snags as there doesn't seem to be an easy way to avoid string-> json -> string -> parser(ndjson) dance. Also parser seems pull based and the kafka is more setup as push based code wise. Going to take some changes. |
Hi! We're labeling this issue as |
#27335 superspeeds this PR, expect it will be the one to get merged. Removing stale. |
This pull request is now in conflicts. Could you fix it? 🙏
|
Closing this as #27335 got merged |
What does this PR do?
It allows the Filebeat Kafka input to handle json. Specifically this enables picking up structured data and exposing it under top level fields in stead of having escaped json in the message field.
Why is it important?
Kafka is often used to pull data away from the log sources as fast as possible to avoid disks filling up and to allow the 'backend of the pipeline to be serviced / incidents be handled, without dropping events on the floor.
This avoid the need for one to apply the decode-json-fields processor immediately after the input to be able to process any of the fields in the structured data.
In the context of modules this change can be a big advantage; right now we can override the input but not change the processors used by the module easy or inject a processor between the input and the module. While this doesn't solve the issue of mismatched structure, it at least allows one to transform the data before it's stored in Kafka so that modules can be used post Kafka.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.