Created
June 20, 2016 13:36
-
-
Save ricsiga/f212d53231d012f10b74c8b57acafb83 to your computer and use it in GitHub Desktop.
delete old filebeat indices from elasticsearch
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
#!/bin/bash | |
index=$(date --date='14 days ago' +%Y.%m.%d) | |
curl -s -XDELETE "http://localhost:9200/filebeat-$index?pretty" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment