[AWS] Add CloudWatch logs latency config option#5777
Merged
Conversation
🌐 Coverage report
|
a57e176 to
5e0d1b7
Compare
dmathieu
approved these changes
Apr 4, 2023
Contributor
|
This PR closes #5712 |
endorama
reviewed
Apr 4, 2023
| show_user: false | ||
| default: 200ms | ||
| description: This is used to sleep between AWS FilterLogEvents API calls inside the same collection period. `FilterLogEvents` API has a quota of 5 transactions per second (TPS)/account/Region. This value should only be adjusted when there are multiple Filebeats or multiple Filebeat inputs collecting logs from the same region and AWS account. | ||
| - name: latency |
Contributor
There was a problem hiding this comment.
I see there is a description in the screenshot and I expected to see it here. Is this missing the description field?
Contributor
Author
|
|
||
| Log events on the busies log groups may require a longer time before they are available to CloudWatch Logs. | ||
|
|
||
| The CloudWatch integration offers the `latency` setting to cope with this scenario. Latency translates the query's time range to consider the CloudWatch Logs latency. For example, a `5m` latency means the integration will query CloudWatch for logs available 5 minutes ago. |
Contributor
There was a problem hiding this comment.
I would document the format expected by this setting, as it may not be familiar. (es a link to the documentation for the underlying string parser that converts strings to time durations)
Contributor
Author
There was a problem hiding this comment.
Good point! Adding it.
Contributor
Author
There was a problem hiding this comment.
Contributor
Author
Oh boy, thank you for the heads up; I forgot to add a reference to this issue! 🤦 (added in the PR description) |
|
Package aws - 1.33.0 containing this change is available at https://epr.elastic.co/search?package=aws |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Motivation
If the logs collection starts at 10:00, then the input will gather logs in this time window:
Unfortunately, logs sometimes become available in CloudWatch with a delay; in these circumstances, the input of the CloudWatch logs could miss them.
For example, if a log event is:
The input will miss that event with the default latency setting 1.
However, the CloudWatch Logs input has a setting called
latencythat allows users to adjust the logs collection time window to cope with the AWS services' latency.Change description
Make the CloudWatch Logs input setting option
latencyavailable in the integration settings.Checklist
changelog.ymlfile.Related issues
latencyoption #5712Screenshots
Settings UI
Documentation
Footnotes
The input will pick that log event up at the next restart if "start position" is set to "beginning". ↩