Last active
January 20, 2020 17:08
-
-
Save tyagiakhilesh/b8d1916ad6cbdb74daf3e67a24bff643 to your computer and use it in GitHub Desktop.
Delete All indices from elastic search.
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
#!/bin/bash | |
(curl -s -XGET 'http://10.160.0.37:9200/_cat/indices/?pretty' ) | awk '{print $3}' | egrep 'stage*|.kibana'| while read -r line; do curl -XDELETE http://10.160.0.37:9200/"${line}";done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment