Currently we can define ILM policy at index level. This creates issues for daily/weekly indexes (eg: logstash) wherein the policy has to be assigned to newly created index as well.
Can we apply Index Lifecycle policies be defined on index patterns instead of Exact Index?
Alternatively, can ILM policy be assigned to indexes using Elasticsearch templates?
ILM policies can be assigned to indices using ES templates (that's the way that our internal indices use them), and in fact its recommended to use them that way. You can add a template for something like metricbeat-* with the index.lifecycle.name and index.lifecycle.rollover_alias settings defined within the template.
Note that the first index requires a bit more setting up, since the alias has to be created and the write flag correctly set. This bootstrapping is something we're working on making easier to do.
Thanks @dakrone, the solution works perfectly fine. We would like to have the capability to assign ILM policies to indexes using index patterns in the future.
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.