Hi, i wanna ask about ILM creating daily indices. Or more likely i am confused about ILM concept with indices based on size. For example: We are logging infrastructure logs from syslog with filebeat. When i use ILM like:
Which means that index is rolled in 50GB to new one and index is deleted after 5days. My daily increase on that index is about 5GB, which means that first roll will be in 10 days, but i need only 5 days retention. How ILM will work when i reach that 5 days? It will delete current index and create new one? That will delete all data and i will have no data for past 5 days. Or elastic will wait until that index will have 50G, than rolled him and delete it? Or it will wait another 5 days before deleting? I am little bit confused how can i achive that. I just want to have 5 days of data available no more no less.
Hi,
Instead of the max_size you can also use the max_age option and set it to 1d.
So 1 day after the index is created (I will call it logs-day01) elasticsearch will create a new index, for example logs-day02.
This would happen every day so the day after creating the logs-day02 it will create logs-day03.
So now you have a index for each day and you can delete a index after 5 days using ilm.
That's the way how you can archive what you want.
Thanks for the link on webinar. I tryed that max-age with 1 day, and i set settings.index.lifecycle.parse_origination_date on index template, but it's not rolled by days:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.