Created
July 4, 2017 18:14
-
-
Save drewr/a52c202be4785713edc2100188e73242 to your computer and use it in GitHub Desktop.
Deleting all the closed indices in a cluster
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
ES=http://localhost:9200 | |
curl -s ${ES}/_cat/indices\?h=status,index | \ | |
awk '/^close/ { print $2 }' | \ | |
while read i; do echo curl -s -XDELETE ${ES}/$i; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment