Create index template elasticsearch
Auto-configure new indices matching logs-*
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}}}'
more elasticsearch
all 19 commands →
Snapshot to repository
curl -X PUT 'http://es:9200/_snapshot/my_repo/snap1?wait_for_completion=true'
Cluster health
curl -s http://localhost:9200/_cluster/health | jq .
List indices
curl -s 'http://localhost:9200/_cat/indices?v&h=index,health,pri,rep,docs.count,store.size&s=store.size:desc'
Delete index
curl -X DELETE http://localhost:9200/<index>
Get index settings
curl -s http://localhost:9200/<index>/_settings | jq .