Created
June 8, 2016 11:51
-
-
Save markuskont/f4f4fb89ec0abdb28687ad7ba60fa36c to your computer and use it in GitHub Desktop.
use ES curator to delete old indices
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 | |
# apt-get install python-pip | |
# pip install elasticsearch-curator | |
RETAINDAYS=14 | |
INDICES=( suricata apache cee syslog samba logstash ) | |
for i in "${INDICES[@]}" | |
do | |
echo "${i}" | |
curator --host localhost delete indices --older-than $RETAINDAYS --time-unit days --timestring '%Y.%m.%d' --prefix "$i" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Old script. This no longer works with recent curator versions