Skip to content

Metricbeat's Elasticsearch index_summary metricset requests far too many metrics #36019

Open
@DaveCTurner

Description

  • Version: Many, including current main f75a2ed
  • Operating System: All
  • Discuss Forum URL: N/A
  • Steps to Reproduce: N/A

Today the Elasticsearch index_summary metricset requests all stats, broken down by index, on every collection:

### index_summary
- `/_stats`
- [api reference](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html)
- [mb exported fields](https://www.elastic.co/guide/en/beats/metricbeat/current/exported-fields-elasticsearch.html#_index_summary)

Metricbeat does not need all these stats, but Elasticsearch cannot know this so it must compute and return them all. Computing stats can be expensive in larger clusters, and returning them all burns network bandwidth as well as CPU on both sender and receiver, so it would be best to make this request as specific as possible. AIUI this metricset only needs the summary stats so should specify ?level=cluster to drop the index-by-index breakdown, and also it only needs a subset of the index metrics which it should specify.

Relates elastic/elasticsearch#97222: it does not look like Metricbeat captures cluster-wide stats about the query cache, so it should drop the query_cache metric. TBC it is an ES bug that these stats in particular are so expensive, but this computation will never be free so it's still a MB bug to request them when they're not needed.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions