# Index lost the alias rollover

**URL:** <https://discuss.elastic.co/t/index-lost-the-alias-rollover/319396>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [November 21, 2022, 8:28am UTC](https://discuss.elastic.co/t/index-lost-the-alias-rollover/319396 "2022-11-21T08:28:05Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![artax\_sb](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@artax\_sb](https://discuss.elastic.co/u/artax_sb)\
**Post date:** [November 21, 2022, 3:02pm UTC](https://discuss.elastic.co/t/index-lost-the-alias-rollover/319396/5 "2022-11-21T15:02:00Z")

</div>

thank you!

but i dont understand it very well, then the fluentd.conf the index name should be  
the alias which use in the template?

for example, i make the lifepolicy, then the template,

```auto
PUT _index_template/indextemplate
{
  "index_patterns": ["index-*"], 
  "template": {
    "settings": {
      "number_of_shards": 1,
      "number_of_replicas": 1,
      "index.lifecycle.name": "index-policy"
      "index.lifecycle.rollover_alias": "indexalias"  
    }
  }

```

and then create the alias and make it writeable

```auto
POST /_aliases
{
  "actions": [
    {
      "add": {
        "index": "index-*",
        "alias": "indexalias",
        "is_write_index": true
      }
    }
  ]

```

so if understand well the congif should be

```auto
<match **>
 @type elasticsearch
 index_name indexalias
 host 
 port 
 user 
 password 
 logstash_format 
</match>

```

---

_[View the full topic](https://discuss.elastic.co/t/index-lost-the-alias-rollover/319396)._
