Распределение шардов elasticsearch
Все шарды с состоянием и причиной назначения
curl -s 'http://es:9200/_cat/shards?v&h=index,shard,prirep,state,node,unassigned.reason'
more elasticsearch
all 19 commands →
Принудительное переназначение шарда
curl -X POST http://es:9200/_cluster/reroute?retry_failed=true
Обновить настройки индекса
curl -X PUT 'http://es:9200/my-index/_settings' -H 'Content-Type: application/json' -d '{"index":{"number_of_replicas":1}}'
Создать шаблон индекса
curl -X PUT 'http://es:9200/_index_template/logs-tpl' -H 'Content-Type: application/json' -d '{"index_patterns":["logs-*"],"template":{"settings":{"number_of_shards":2}}}'
Снимок в репозиторий
curl -X PUT 'http://es:9200/_snapshot/my_repo/snap1?wait_for_completion=true'
Здоровье кластера
curl -s http://localhost:9200/_cluster/health | jq .