-
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
Change to use one period between start and end time #27327
Conversation
Pinging @elastic/integrations (Team:Integrations) |
This pull request is now in conflicts. Could you fix it? 🙏
|
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
(cherry picked from commit 35454a7)
(cherry picked from commit 35454a7)
What does this PR do?
This PR is to change startTime and endTime of
GetMetricData
API incloudwatch
metricbeat to be only one collection period apart. Bug in previous code is:First Metricbeat collection cycle: startTime = 06:50:35 endTime = 07:00:35 -> cloudwatch metric timestamp = 06:55:00
Second Metricbeat collection cycle: startTime = 06:55:35 endTime = 07:05:35 -> cloudwatch metric timestamp = 06:55:00
The problem is caused by the startTime and endTime parameters in AWS CloudWatch GetMetricData API only look at the hour and minute (e.g: 06:50 and 07:00) in a timestamp. And also the gap between startTime and endTime is double the period, which causes more than one data point gets returned.
This PR is to first round the timestamps to ignore seconds. Then change startTime to be one collection period ahead of endTime. If no data is collected, which means services have a delay to send metrics into AWS CloudWatch. In this case,
latency
config parameter should be used.Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.