How to freeze only certain indices with Freeze Index API

Hello,

I am looking into freezing some of the indices in our cluster. Is there a way to freeze only specific range of indices? For example, those that are earlier than 2019. I tried to use freeze with range query but ended up freezing every index under, for example, metricbeat-*.

I am running into a similar situation with forcemerge. Is it possible to forcemerge only those indices that I am planning to freeze?

Hi @mhasanbulli,

I think what you observed is correct for Freeze API.
I am not sure if you have looked at ILM (Index Lifecycle management) feature.
From the description of the problem statement, I think ILM would help you with what you want to achieve.
Following are some links from the documentation:
https://www.elastic.co/guide/en/elasticsearch/reference/6.7/index-lifecycle-management.html
https://www.elastic.co/guide/en/elasticsearch/reference/6.7/_actions.html

Hope this helps

Thanks and Regards,
Yogesh Gaikwad

Than you for your quick reply @Yogesh_Gaikwad. I was not aware of the ILM.

It seems like if the policy is attached to each index one by one from the Index Management page, it is only then the policy starts working.

There are also strict rules around if you are using a rollover. I mostly was wanting to use this for Beats indices and the trick is to set the policy with rollover turned off.

Cheers,
Mus.

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