Skip to content

Instantly share code, notes, and snippets.

@michelep
Created November 16, 2020 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michelep/893627c8c003cfc695ccbef8685eb3d0 to your computer and use it in GitHub Desktop.
Save michelep/893627c8c003cfc695ccbef8685eb3d0 to your computer and use it in GitHub Desktop.
Wazuh 4.x - Clean unassigned sharks in ElasticSearch
curl -XGET https://localhost:9200/_cat/shards -u admin:admin -k | grep UNASSIGNED | awk {'print $1'} | xargs -i curl -XDELETE "https://localhost:9200/{}" -u admin:admin -k
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment