Skip to content

Instantly share code, notes, and snippets.

@kcdragon
Created August 5, 2016 16:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kcdragon/e56892cc4bd7529d1db38e4ef3b49b75 to your computer and use it in GitHub Desktop.
Save kcdragon/e56892cc4bd7529d1db38e4ef3b49b75 to your computer and use it in GitHub Desktop.
Fix ElasticSearch Red Status
# 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