-
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
Collect bulk indexing stats for Elasticsearch metricsets #17992
Conversation
Pinging @elastic/stack-monitoring (Stack monitoring) |
Pinging @elastic/integrations-services (Team:Services) |
@igoristic I've requested your review on this PR as a functional reviewer. Please see the "How to test this PR locally" section in the PR description for instructions on how to functionally test this PR. |
00d632c
to
9b70a50
Compare
💚 Build SucceededExpand to view the summary
Build stats
Test stats 🧪
|
Failure in statsd tests should be fixed by #18130, the other failures may be related. |
9b70a50
to
65be0c9
Compare
Looking at the CI errors from the This PR adds To address this correctly, we need to add Accordingly, I'm moving this PR back into draft state. Once I've implemented the necessary changes, I'll put it back into review. |
Yeah I was wondering if I should wait for the CI to turn green before I can test it |
That would be ideal but there might be unrelated test failures. I'll ping you here where it's ready to test. |
@igoristic CI is looking good now. There are failures but they are unrelated to this PR. Please go ahead and test it. Thanks! |
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.
Tested all case scenarios mentioned in step 5, and those fields are no longer null (like they are in master):
Thank you for fixing this @ycombinator 🙇
…8229) * Collecting new index_stats bulk metrics * Collecting new indices_stats bulk metrics * Collecting new node_stats bulk metrics * Adding CHANGELOG entry * Request bulk stats * Request bulk metrics only if supported * Fixing code and tests * Fixing code so only service URI path is replaced * Updating unit tests
TotalOperations int `json:"total_operations"` | ||
TotalTimeInMillis int `json:"total_time_in_millis"` | ||
TotalSizeInBytes int `json:"total_size_in_bytes"` | ||
AvgTimeInMillis int `json:"throttle_time_in_millis"` |
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.
@ycombinator Is this a typo? Should it be json:"avg_time_in_millis"
?
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, it should 😞. Good eye, nice catch! I assume parity tests failed? I'll put up a PR to fix it. Thanks!
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.
PR is up: #18420
What does this PR do?
Collects new
bulk
indexing metrics being reported by Elasticsearch in theindex
,index_summary
, andnode_stats
metricsets for the Stack Monitoring code path (i.e. whenxpack.enabled: true
is set in these metricsets' configurations).These metricsets correspond to
type:index_stats
,type:indices_stats
, andtype:node_stats
documents, respectively, in.monitoring-es-*
indices used by the Stack Monitoring UI.Why is it important?
To restore parity between legacy internal collection and Metricbeat collection for Elasticsearch monitoring. The changes corresponding to this PR for legacy internal collection were made in elastic/elasticsearch#52208.
Checklist
I have commented my code, particularly in hard-to-understand areasI have made corresponding changes to the documentationI have made corresponding change to the default configuration filesCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.How to test this PR locally
Run the latest
8.0.0-SNAPSHOT
build of Elasticsearch so it exposes the newbulk
indexing metrics being collected by the code in this PR.Build Metricbeat with the changes in this PR.
Enable the
elasticsearch-xpack
module.Create a minimal Metricbeat configuration for testing.
Here, we only enable
monitoring.elasticsearch
to generate some bulk indexing requests to Elasticsearch so we can see non-zero bulk metrics.Run Metricbeat with the minimal configuration and look for the new
bulk
indexing metrics' fields. You may need to run these for ~30 seconds for some bulk indexing to happen and corresponding metrics to be generated by Elasticsearch.index
metricset, i.e.type:index_stats
documents:index_summary
metricset, i.e.type:indices_stats
documents:node_stats
metricset, i.e.type:node_stats
documents:Related issues