Skip to content
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

Feature request: Allow indices stats search API to support groups. #223

Open
onimisionipe opened this issue Feb 21, 2019 · 4 comments · May be fixed by #505
Open

Feature request: Allow indices stats search API to support groups. #223

onimisionipe opened this issue Feb 21, 2019 · 4 comments · May be fixed by #505

Comments

@onimisionipe
Copy link
Contributor

Hello again and thank you for this good work!

Would be nice to have groups option for indices stats (https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html).
e.g GET /_stats/search?groups=group1,group2
This would help us track some specific group performance metrics.
This is currently being tracked here: https://phabricator.wikimedia.org/T214547

@nomoa
Copy link

nomoa commented Feb 21, 2019

I think it'd be very valuable to be able to request and monitor all groups when fetching the node statistics: /_nodes/_local/stats?groups=_all.

@zwopir
Copy link
Member

zwopir commented Feb 25, 2019

I don't have an overview what metrics we would add compared to the existing stats collector. If it makes sense (as @nomoa indicates with the <3), we can discuss the technical implications (compatibility with the existing stats collector, json unmarshaling, ...). I'm a bit conservative with adding more and more collectors to the exporter that increase the number of http calls and load on the ES nodes, but if provides a significant benefit to the majority of users, we can of cause discuss it.

Can you please elaborate a bit on it? I currently don't have much time to work on this, but I'm happy to review PRs

@nomoa
Copy link

nomoa commented Feb 25, 2019

This feature would not require another api call I think as it would fit in the current /_nodes[/_local]/stats call I think, perhaps just a new param to the collector (e.g. -es.stat_groups?).

Stats groups allow application developers to tag their elasticsearch queries with a specific group, elasticsearch will then make these groups available through the stats API.
These groups are usually meant to distinguish different kind of searches whose performance varies:

  • a simple fast autocomplete search
  • a costly phrase search
  • anything that the application developer might think is interesting to track perf for

By scanning the groups the exporter could generate the same elasticsearch_indices_search_* metrics with a new stat_group label.

This would allow to graph a specific group (e.g. fetch times of autocomplete queries vs fulltext search queries).

@AmiStrn
Copy link

AmiStrn commented Jun 7, 2021

I fully agree with @onimisionipe and @nomoa, this is a feature that would allow to compare different dashboard performance, or compare different queries performance based on their target index. It would allow to benchmark specific queries and understand optimizations once they are in place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants