I am using Elasticsearch 2.4.1, and have Logstash 2.4.1 and Heapster 1.2.0 to send logs and performance metrics to Elasticsearch, my index are like this:
$ curl 127.0.0.1:9200/_cat/indices?v
health status index pri rep docs.count docs.deleted store.size pri.store.size
green open logstash-2017.01.03 1 0 622530 0 399.6mb 399.6mb
green open logstash-2017.01.04 1 0 64176 0 40.2mb 40.2mb
green open heapster 1 0 408956 0 62.2mb 62.2mb
Logstash and Heapster will send a lot of data to Elasticsearch every day. So I am wondering if Elasticsearch can be configured to remove oldest data regularly, e.g., only keep the data of the last 1 day or 1 week.