OpenSearch icon indicating copy to clipboard operation
OpenSearch copied to clipboard

Stats API to identify which indices (and shards?) are getting updates

Open msfroh opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe. During a recent on-call shift I realized that we don't seem to have a decent API to quickly determine what indices/shards are getting updates. When a cluster is processing lots of updates and you want to see how those updates are balanced across nodes, it would be helpful to at least know what shards are receiving updates, then can check how those shards are assigned to nodes.

Describe the solution you'd like I think we could add a field to ShardsStats and maybe IndexStats with the timestamp of the last processed IndexRequest.

Something like /_cat/indices could add a column for it.

Describe alternatives you've considered Quick and dirty solution:

  1. GET /_cat/indices -> output to a file called t1
  2. cat t1 | sort > t1-sorted2
  3. Wait a minute
  4. GET /_cat/indices -> output to a file called t2
  5. cat t2 | sort > t2-sorted
  6. diff t1-sorted t2-sorted

Additional context N/A

msfroh avatar Oct 19 '23 23:10 msfroh