http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cat.html
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cluster-nodes-shutdown.html
Take one elasticsearch box (in AWS cloud) of the cluster (for example, maintenance jobs such as upgrade and reboot the box): http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-cluster.html
curl -XPUT localhost:9200/_cluster/settings -d '{
"transient" : {
"cluster.routing.allocation.exclude._ip" : "10.0.0.1"
}
}'
Another way
curl -XPUT localhost:9200/_cluster/settings -d '{
"transient" :{
"cluster.routing.allocation.exclude.name" : "ip-10-01-1-23_i-416a2d7e"
}
}'
Notes:
1. You need AWS plug-in for elasticsearch.
2. when do the maintenance, you need take one box off the cluster, this curl command will be useful.
3. replace "localhost" to your logstash load banancer dns name, "10.0.0.1" to the real ip address, or "ip-10-01-1-23_i-416a2d7e" to real aws instance id.