-
Notifications
You must be signed in to change notification settings - Fork 148
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
Increase metrics interval to 60s #3578
Increase metrics interval to 60s #3578
Conversation
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
🌐 Coverage report
|
changelog/fragments/1696955150-Slow-down-agent-monitoring-metrics-interval-to-60s.yaml
Outdated
Show resolved
Hide resolved
@@ -517,6 +518,8 @@ func (b *BeatsMonitor) monitoringNamespace() string { | |||
} | |||
|
|||
func (b *BeatsMonitor) injectMetricsInput(cfg map[string]interface{}, componentIDToBinary map[string]string, monitoringOutputName string, componentList []component.Component) error { | |||
metricsCollectionInterval := 60 * time.Second |
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.
Any reason not to make this a constant?
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.
Also would be great to add a "why" comment for future us.
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.
Added a constant in 4303ee0
Not sure what you mean with a "why" comment? You mean "Why do we set it to 1 minute?" type of comment ?
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.
Yes, sorry, I should've been clearer. I think it would be good to know why we're using 1 minute, because typically most of our polling periods (thinking of Metricbeat modules) are 10s by default.
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.
The purpose here was to reduce the load/data volume on the monitoring cluster without loosing the ability to get constant data from agent, that's why we ended up choosing 1 minute.
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.
The purpose here was to reduce the load/data volume on the monitoring cluster without loosing the ability to get constant data from agent, that's why we ended up choosing 1 minute.
Right, I got that from the PR description as well. Let's put it in a comment above the const declaration so someone looking at the code a few months from now easily understands it as well (without needing to find the commit that introduced it -> this PR).
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.
done in 4d71ff6
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.
Left a couple of minor comments, but otherwise change LGTM.
buildkite test this |
buildkite test this |
SonarQube Quality Gate |
@jlind23 @joshdover thoughts on backporting this one to 8.11? My view is we could consider this a system level bug fix or optimization, it's not really a feature. |
I agree with @cmacknz about backporting this in 8.11 to get it in asap as this is not a new feature. |
@pierrehilbert @cmacknz Let's do it then! Please also think about updating the doc. |
* Increase elastic-agent monitoring metrics interval to 60s (cherry picked from commit 82896f5)
* Increase elastic-agent monitoring metrics interval to 60s (cherry picked from commit 82896f5) Co-authored-by: Paolo Chilà <[email protected]>
What does this PR do?
Increase metricset execution interval for monitoring inputs created by agent.
Why is it important?
To reduce the amount of data and the load related to collecting agent metrics
Checklist
[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files./changelog/fragments
using the changelog tool[ ] I have added an integration test or an E2E testAuthor's Checklist
How to test this PR locally
Related issues
Use cases
Screenshots
Logs
Questions to ask yourself