Skip to content

Instantly share code, notes, and snippets.

@cpuspellcaster
Created September 27, 2017 16:12
Show Gist options
  • Save cpuspellcaster/1c7c5f354ab48ec4b7151270a58e4491 to your computer and use it in GitHub Desktop.
Save cpuspellcaster/1c7c5f354ab48ec4b7151270a58e4491 to your computer and use it in GitHub Desktop.
delete-logstash-indicies.sh
#! /usr/bin/env bash
month=07
for i in {1..31}
do
day=$(printf "%02d" $i)
curl -XDELETE "https://[CLUSTER_ENDPOINT]/logstash-2017.$month.$day"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment