# Facing issues with ILM on auto indexes

**URL:** <https://discuss.elastic.co/t/facing-issues-with-ilm-on-auto-indexes/322789>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [January 10, 2023, 6:20am UTC](https://discuss.elastic.co/t/facing-issues-with-ilm-on-auto-indexes/322789 "2023-01-10T06:20:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rahul\_sirugudi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rahul_sirugudi/32/94019_2.png) [@rahul\_sirugudi](https://discuss.elastic.co/u/rahul_sirugudi)\
**Post date:** [January 10, 2023, 6:20am UTC](https://discuss.elastic.co/t/facing-issues-with-ilm-on-auto-indexes/322789/1 "2023-01-10T06:20:46Z")

</div>

I am playing with ILM on one index named as filebeat-7.17.8-2023.01.09. This is the auto index. i want to create ILM on this so i have created alias for this index.

```auto
curl -XPUT 'ip/filebeat-7.17.8-*/_alias/filebeat-0002-1'

```

With this my expectation is any new index created as

`filebeat-7.17.8-2023.mm.dd` should have filebeat-0002-1 as alias. But it is not working currently. Every time i have to create alias on the newer index and apply ILM.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [January 11, 2023, 1:00am UTC](https://discuss.elastic.co/t/facing-issues-with-ilm-on-auto-indexes/322789/2 "2023-01-11T01:00:31Z")

</div>

Hi @rahul_sirugudi

I think You might have it slightly backwards 🙂

Write alias is the generic name, it is also known as the rollover alias.  
The specific index name is the concrete index

> **[Configure a lifecycle policy | Elasticsearch Guide \[7.17\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/set-up-lifecycle-policy.html#create-initial-index)**

So yours would like something like this...

Then your filebeat would write to `filebeat-7.17.8` and then when the index rolls over

Try this and you will see..

```auto
PUT filebeat-7.17.8-2023.01.09
{
  "aliases": {
    "filebeat-7.17.8":{
      "is_write_index": true 
    }
  }
}

POST filebeat-7.17.8/_rollover

```

---

<div class="post-metadata">

**Author:** ![rahul\_sirugudi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rahul_sirugudi/32/94019_2.png) [@rahul\_sirugudi](https://discuss.elastic.co/u/rahul_sirugudi)\
**Post date:** [January 11, 2023, 8:58am UTC](https://discuss.elastic.co/t/facing-issues-with-ilm-on-auto-indexes/322789/3 "2023-01-11T08:58:50Z")

</div>

correct me if i am wrong, from the above API we are creating index and the alias right? What if my indexes are already existing?

---

<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:** [February 8, 2023, 8:58am UTC](https://discuss.elastic.co/t/facing-issues-with-ilm-on-auto-indexes/322789/4 "2023-02-08T08:58:50Z")

</div>

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