Purge older logstash indices
# List all indices
curl -XGET 'localhost:9200/_cat/indices?v&pretty&s=index'
# Purge old indices
curl -XDELETE 'localhost:9200/logstash-2016.11.*'
# Search older HaProxy records
curl -XGET 'localhost:9200/haproxy/_search?scroll=1m' -d '{"query":{"bool":{"filter":{"range":{"syslog_time":{"lte":"13/Nov/2016:00:18:26 +0000"}}}}}}'
# Delete older HaProxy records
curl -XPOST 'localhost:9200/haproxy/_delete_by_query' -d '{"query":{"bool":{"filter":{"range":{"syslog_time":{"lte":"13/Nov/2016:00:18:26 +0000"}}}}}}'
curl -XPOST 'localhost:9200/haproxy/_forcemerge?only_expunge_deletes=true'
Edited by Jürgen Haas