[Elasticsearch] shard allocation 운영 테스트용 REST 코드

Elastic/Elasticsearch 2015. 7. 2. 18:18
매번 작성 하기 귀찮아서 그냥 남겨 봅니다.

[shard allocation disable]
curl -XPUT localhost:9200/_cluster/settings -d '{
    "persistent" : {
    "cluster.routing.allocation.disable_allocation" : true
    }
}'

[모든 종류의 shard allocation disable]
curl -XPUT localhost:9200/_cluster/settings -d '{
    "transient" : {
        "cluster.routing.allocation.enable" : "none"
    }
}'

[shard allocation enable]
curl -XPUT localhost:9200/_cluster/settings -d '{
    "persistent" : {
    "cluster.routing.allocation.disable_allocation" : false
    }
}'

[모든 종류의 shard allocation enable]
curl -XPUT localhost:9200/_cluster/settings -d '{
    "transient" : {
        "cluster.routing.allocation.enable" : "all"
    }
}'

[모든 인덱스의 replica shard disable]
curl -XPUT localhost:9200/*/_settings -d '{"number_of_replicas":0}'



: