-
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
Adding functionality to death letter index instead of dropping events. #26952
Conversation
Currently when theres a mapping conflict events are dropped, this commits allows one attempting to index it into a different index instead so it can be re-ingested later vs dropping or stalling ingest. The new code tries to death letter index for a wider rage including read only block(403) which is likely to fail for the death letter index as well. The index currently most reside on the same ES cluster. Changing this, if desired, would be a separate PR. Similair to the format we use to store on the death letter index (original message is ecapsed json in the message field.
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
Pinging @elastic/agent (Team:Agent) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All in all, great PR with good tests. I have a few nits that are not required to be addressed if you do not want to. However, the configuration should be reworked a bit to be more user friendly.
Co-authored-by: Noémi Ványi <[email protected]>
…to pass arguments
- using constants over string literals - Improved config as suggested by review - added test for config
dead letter vs death letter 😂 Made the changes to the config setuo, also reduced some more parameters by making additional functions a function of client |
This pull request is now in conflicts. Could you fix it? 🙏
|
@kvch think it's all good now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the PR description with the new configuration format. Also, as it is a new feature, please make it beta with cfgwarn.Beta
and beta[]
in the documentation.
Otherwise, the PR LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome \o/
Once you fix the lint errors, you can merge it. Thanks for the PR! |
Adding functionality to death letter index instead of dropping events. When there's a mapping conflict events are dropped, this commits allows one attempting to index it into a different index instead so it can be re-ingested later vs dropping or stalling ingest. The index currently must reside on the same ES cluster. * buildCollectPublishFails and other functions changed to be a function of Client so not to have to pass arguments Co-authored-by: Noémi Ványi <[email protected]> (cherry picked from commit 60cf09d)
Adding functionality to death letter index instead of dropping events. When there's a mapping conflict events are dropped, this commits allows one attempting to index it into a different index instead so it can be re-ingested later vs dropping or stalling ingest. The index currently must reside on the same ES cluster. * buildCollectPublishFails and other functions changed to be a function of Client so not to have to pass arguments Co-authored-by: Noémi Ványi <[email protected]> (cherry picked from commit 60cf09d) Co-authored-by: Michael Bischoff <[email protected]>
Adding functionality to death letter index instead of dropping events. When there's a mapping conflict events are dropped, this commits allows one attempting to index it into a different index instead so it can be re-ingested later vs dropping or stalling ingest. The index currently must reside on the same ES cluster. * buildCollectPublishFails and other functions changed to be a function of Client so not to have to pass arguments Co-authored-by: Noémi Ványi <[email protected]> (cherry picked from commit 60cf09d)
What does this PR do?
Allows the user to specify the policy (/action) of how to deal with non-indexable events. We default to
drop
dropping the event which is current behavior. Alternatively one can specifydeath_letter_index
to index into the specified index nameWhy is it important?
Currently when there's a mapping conflict events are dropped, this is undesirable for a lot of customers. While filebeat technically doesn't violate it's guarantee that events are delivered at least once, it does cause the event to be lost. Which is both undesirable and unexpected behavior for most customers.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.How to test this PR locally
See integration test,
Configure filebeat with the ES ouput and specifying the action and index
Then creating a mapping conflict:
Related issues
Use cases
When a mapping conflict occurs the message is kept and indexed into an alternative index. This can then later be re-ingested after either the data or the index (the alias points to) is changed.
Other remarks
error.type
(http code) anderror.message
(description)