Forked from ricsiga/delete_old_filebeat_indices.sh
Created
December 13, 2017 19:55
-
-
Save marcusdb/a18632e9dfa41a628ffe16af6808a654 to your computer and use it in GitHub Desktop.
delete old filebeat indices from elasticsearch
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 | |
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