Created
August 5, 2016 16:32
-
-
Save kcdragon/e56892cc4bd7529d1db38e4ef3b49b75 to your computer and use it in GitHub Desktop.
Fix ElasticSearch Red Status
This file contains hidden or 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
# only tested on development machine | |
curl "localhost:9200/_cluster/health?level=indices&pretty=true" | grep -B 1 '"status" : "red"' | grep "{" | cut -d"\"" -f2 | while read -r line ; do curl -XDELETE localhost:9200/$line && echo; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment