# Ilm policy error

**URL:** <https://discuss.elastic.co/t/ilm-policy-error/310135>\
**Category:** Logstash\
**Tags:** ilm-index-lifecycle-management\
**Created:** [July 20, 2022, 11:36am UTC](https://discuss.elastic.co/t/ilm-policy-error/310135 "2022-07-20T11:36:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![HeTvaM](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hetvam/32/108049_2.png) [@HeTvaM](https://discuss.elastic.co/u/HeTvaM)\
**Post date:** [July 20, 2022, 11:36am UTC](https://discuss.elastic.co/t/ilm-policy-error/310135/1 "2022-07-20T11:36:58Z")

</div>

I have been trying to set up ilm policy for my indexes for several weeks now. I use filebeat in conjunction with logstash and my indexes end up being created every day.

An example of my index name:  
'filebeat-7.7.1-2022.07.20'

I have an index template which for each  
'filebeat-7.7.1-\*'  
makes adjustments, I remove some fields, add dynamic mapping and so on.

In addition I have ilm\_policy: general, in which are configured sections hot, warm, delete

In the index template I specified:  
 ![изображение](https://us1.discourse-cdn.com/elastic/original/3X/c/a/caddced2b1e3ac39b36eb5a75a63ec5e11b3ec4e.png)

But I keep getting errors at the check-rollover step. After looking at similar questions, I realized that I need to specify the first index manually ( with the parameter 'is\_writre\_index: true') and add a counter type 000001, 000002 and so on at the end, so elastic can rollover my indexes correctly.

Example of a manually created index:  
 ![изображение](https://us1.discourse-cdn.com/elastic/original/3X/8/b/8b0e3b715da3433eedbf62621e27753f8c57158b.png)

But the problem is the following, logs don't go into this file and logstash creates a new index without a counter. And here I don't understand how I can link this so that my indexes that are created every day use ilm\_policy and work correctly

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 17, 2022, 11:37am UTC](https://discuss.elastic.co/t/ilm-policy-error/310135/2 "2022-08-17T11:37:53Z")

</div>

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