# ILM and rollover in hot-warm issue

**URL:** <https://discuss.elastic.co/t/ilm-and-rollover-in-hot-warm-issue/233913>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [May 22, 2020, 2:05pm UTC](https://discuss.elastic.co/t/ilm-and-rollover-in-hot-warm-issue/233913 "2020-05-22T14:05:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![antimonio85](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@antimonio85](https://discuss.elastic.co/u/antimonio85)\
**Post date:** [May 22, 2020, 2:05pm UTC](https://discuss.elastic.co/t/ilm-and-rollover-in-hot-warm-issue/233913/1 "2020-05-22T14:05:34Z")

</div>

Hello all,  
I keep having errors in the rollover and I don't know how to fix them.  
I have 2 elastic node and I configure it in HOT-WARM.  
The index are automatically created by filebeat - logstash and they are split by day ex. logs\_2020-05-22, logs\_2020-05-21, etc...

Once index have only 1 shards and its size is approx. 5.5Gb

I would like that all index older than 30 days are moved on warm node and after 90 days the index will be deleted.  
I have create this ILM:

```auto
`PUT _ilm/policy/hot-warm-90days-delete
`{
` "policy": {
` "phases": {
` "hot": {
` "min_age": "0ms",
` "actions": {
` "rollover": {
` "max_age": "30d"
` },
` "set_priority": {
` "priority": 100
` }
` }
` },
` "warm": {
` "min_age": "30d",
` "actions": {
` "allocate": {
` "include": {},
` "exclude": {},
` "require": {
` "box_type": "warm"
` }
` },
` "set_priority": {
` "priority": 50
` }
` }
` },
` "delete": {
` "min_age": "90d",
` "actions": {
` "delete": {}
` }
` }
` }
` }
`}

```

Now I have multiple issue.  
For example, if I not set rollover alias:  
`setting [index.lifecycle.rollover\_alias] for index [logs\_2020-03-30] is empty or not defined

If I set rollover alias:  
`index.lifecycle.rollover\_alias [hot\_warm] does not point to index

I try to set index aliases and set rollover alias in ILM template and index template  
I try to set only rollover alias.  
I try to set only index aliases.  
But every attempt was unsuccessful.

In my last attempt I set only for index logs\_2020-03-31 aliases and rollover alias and the rollover complete, the index was moved on warm node.  
How I can automate the rollover for all index?

Please could help me 😢

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 26, 2020, 12:23am UTC](https://discuss.elastic.co/t/ilm-and-rollover-in-hot-warm-issue/233913/2 "2020-05-26T00:23:04Z")

</div>

Welcome! 😃

What settings are you applying when you create the index and set it up for [rollover](https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-rollover.html)?

---

<div class="post-metadata">

**Author:** ![antimonio85](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@antimonio85](https://discuss.elastic.co/u/antimonio85)\
**Post date:** [May 28, 2020, 6:38am UTC](https://discuss.elastic.co/t/ilm-and-rollover-in-hot-warm-issue/233913/3 "2020-05-28T06:38:51Z")

</div>

Hello warkolm,  
I create index by logstash config:

```auto
output {
  elasticsearch {
    hosts => ["http://10.52.84.163:9200","http://10.52.84.164:9200"]
    index => "logs_%{+YYYY-MM-dd}"
    doc_as_upsert => "true"
    document_id => "%{fingerprint}"
    ilm_enabled => true   
  }
}

```

In Kibana I create an elasticsearch index template:

```auto
PUT _template/ilm_hot_warm
{
  "order": 0,
  "index_patterns": [
    "logs_*"
  ],
  "settings": {
    "index": {
      "lifecycle": {
        "name": "hot-warm-90days-delete"
      },
      "number_of_replicas": "0",
      "refresh_interval": "30s"
    }
  },
  "mappings": {
    "_doc": {
      "_source": {
        "excludes": [],
        "includes": [],
        "enabled": true
      },
      "_meta": {},
      "_routing": {
        "required": false
      },
      "dynamic": true,
      "numeric_detection": false,
      "date_detection": true,
      "dynamic_date_formats": [
        "strict_date_optional_time",
        "yyyy/MM/dd HH:mm:ss Z||yyyy/MM/dd Z"
      ],
      "dynamic_templates": [],
      "properties": {}
    }
  }
}

```

The ilm policy "hot-warm-90days-delete" is in first post.

---

<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:** [June 25, 2020, 6:38am UTC](https://discuss.elastic.co/t/ilm-and-rollover-in-hot-warm-issue/233913/4 "2020-06-25T06:38:59Z")

</div>

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