Read/Write alias for Elastic search indices

Hello i have a logstash configuration which will create the indices on monthly basis, i am creating an alias for each index through template which i am using it for reading the documents. I need another alias which is used to POST and PUT operations on current index. Is there a job or API in ES where i can roll the write alias to present month index instead of doing it manually every month

Have a look at rollover indices, where you can set the max_age to a month. You still occasionally need to hit _rollover, which will check whether a new index needs to be created and the alias needs to rollover based on the conditions. In the future, we're looking to make this simpler with something called index lifecycle management. As part of that, we in fact have a plan to introduce write aliases

Hi Shane thanks for the reply i have a confusion/question when i set the max_age to a month will the roll over happens in the next month irrespective if the old index was created in mid of the month? or the age of the index should be something like 30 days?

Sorry, I should have been clearer: you should set it to 30 days. Currently, the rollover API uses time units which only supports up to days in terms of resolution

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.