Created
May 17, 2017 13:32
-
-
Save melnikk/6dfc878b28fe2ab82d175713c00c5ea0 to your computer and use it in GitHub Desktop.
Delete unassigned shards from Elasticsearch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
curl -XDELETE `curl http://localhost:9200/_cat/shards?h=index,shard,prirep,state,unassigned.reason | grep UNASS | awk '{print "http://localhost:9200/" $1}'` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment