[英]How to get current using shards in Elasticsearch or Opensearch
當我添加新索引時,我的 opensearch 有時會遇到此錯誤:
Validation Failed: 1: this action would add [2] total shards, but this cluster currently has [1000]/[1000] maximum shards open;
所以我必須增加cluster.max_shards_per_node更大。 我想知道是否有任何方法可以檢查我們正在使用的當前分片以避免發生此錯誤?
查看索引和搜索活動的最佳方式是使用監控系統。 Elasticsearch最好的監控系統是Opster。 您可以通過以下鏈接免費試用。 https://opster.com/
對於手動檢查和排序,您可以嘗試以下 API。
您可以根據creation date string
(cds) 對索引進行排序。 它將幫助您了解哪一個是舊的。 因此,您可以了解您的索引(分片)。
GET _cat/indices?v&h=index,cds&s=cds
此外,您檢查索引統計信息以查看是否有任何搜索或索引活動。
要檢查所有索引,您可以使用GET _all/_stats
要僅檢查一個索引,您可以使用GET index_name/_stats
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.