ILM policy based on index and not on index template

Is there a way to configure ILM policy specific to index and not based on index template? it is annoying to have multiple templates and specifying index patterns for each type (daily, monthly, yearly). If i want to implement ILM policy for a specific index, i have to create a template and can't use default template. If i have 10 different daily indices, should i have different 10 different index templates to apply ILM? Using wild card on new template is also not helping since the ILM policy is getting applied to all newly created indices which are not just daily.
Can someone from ES suggest here?


You can set directly on an index when you create it.
Notice is says

These index-level ILM settings are typically configured through index templates

But you can set manually on a specific index upon creation as well

See Here

Thanks for quick reply. My indices are created via logtsash and i am looking for something that the ILM policy is applied during the time of index creation and obviously not through index template since all my indices uses default template. I couldn't find such on the documentation provided. please let me know how it is done.

Thank you,

Did you look at this?

So it can't be applied automatically? Like specifying the ILM policy in logstash output config while index is being created?

Perhaps we typed at the same time, I think exactly what you are looking for...


  • Value type is string
  • Default value is logstash-policy

Modify this setting to use a custom Index Lifecycle Management policy, rather than the default. If this value is not set, the default policy will be automatically installed into Elasticsearch

If this setting is specified, the policy must already exist in Elasticsearch cluster.

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