-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[receiver/mongodbatlas] Alerts Retrieval #14180
[receiver/mongodbatlas] Alerts Retrieval #14180
Conversation
…tor-contrib into mongodbatlas-alerts-retrieval
…tor-contrib into mongodbatlas-alerts-retrieval
…tor-contrib into mongodbatlas-alerts-retrieval
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.
Lots of feedback, but I think there's also a general design issue that will lead to scalability problems.
Specifically, I don't think it's reasonable to assume that we can process all of the alerts that are available to us at a given time. We need to limit the size of the plog.Logs
emitted by the receiver.
If we don't, we may be passing a payload down the pipeline that is so large that it is not easily processed or exported. We may even eat up all memory available to the collector.
This can be made scalable by emitting multiple times per poll cycle, when appropriate. This gives the pipeline an opportunity to process and export the data.
The easiest way to do this would be to emit a plog.Logs
once per page. The sdk allows page size to be configured, so at a later time we may choose to expose that to users so that they have a way to further limit the size of payloads.
Implementing this solution will affect the way you're tracking the lastRecordedTime
, so be careful to ensure it is only saved to the receiver once per poll cycle.
Co-authored-by: Daniel Jaglowski <[email protected]>
Co-authored-by: Daniel Jaglowski <[email protected]>
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.
This looks good @schmikei. Thanks for iterating on it.
Description: Spikes out some retrieval of alerts. This is because sometimes firewalls block mongodbatlas from forwarding to the collector.
Example JSON output:
Implemented inside this is usage of the storage extension that can optionally specify a storage extension to persist checkpoints as the API does not support filtering between a time range.
Example config
Link to tracking Issue: Resolves #14121
Testing: Adds unit testing/psuedo integration testing
Documentation: More documentation on alerts has been added.