Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- elastic_admin_ip=192.168.193.225
- elastic_admin_port=9200
- index_close_days=10
- index_remove_days=15
- #log_level=ERROR
- log_level=INFO
- DEFAULT_OPTIONS=' --time-unit days --timestring "%Y.%m.%d" --prefix logstash'
- # Delete indexes older than specified
- /usr/local/bin/curator --loglevel "$log_level" --host "$elastic_admin_ip" --port "$elastic_admin_port" delete indices --older-than "$index_remove_days" ${DEFAULT_OPTIONS}
- # ..and close the slightly older.
- /usr/local/bin/curator --loglevel ${log_level} --host ${elastic_admin_ip} --port ${elastic_admin_port} close indices --older-than ${index_close_days} ${DEFAULT_OPTIONS}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement