1、查找UNASSIGNED未分片的索引:
#curl -s "http://localhost:9200/_cat/shards" -u username:passwd | grep UNASSIGNED
2、找一台数据节点的唯一标识:172.16.16.44(43、45、46)都可以
#curl 'localhost:9200/_nodes/process?pretty' -u username:passwd
3、修复logstash-foo-2016.12.19索引,shard数表示UNASSIGNED中查到的未分片索引的标志
curl -XPOST 'localhost:9200/_cluster/reroute' -u username:passwd -d '{
"commands" : [ {
"allocate" : {
"index" : "logstash-foo-2016.12.19",
"shard" : 3,
"node" : "w_kwzooiQ329VTcDlKnp8Q",
"allow_primary" : true
}
}
]
}'