# Index Management rollover not working

**URL:** <https://discuss.elastic.co/t/index-management-rollover-not-working/224162>\
**Category:** Elasticsearch\
**Created:** [March 18, 2020, 5:16pm UTC](https://discuss.elastic.co/t/index-management-rollover-not-working/224162 "2020-03-18T17:16:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![somebody](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@somebody](https://discuss.elastic.co/u/somebody)\
**Post date:** [March 18, 2020, 5:16pm UTC](https://discuss.elastic.co/t/index-management-rollover-not-working/224162/1 "2020-03-18T17:16:37Z")

</div>

Hi,

I have a Index Management Policy like this:

```auto
PUT _ilm/policy/sample_qa_policy
{
  "policy": {
    "phases": {
      "hot": {
        "min_age": "0ms",
        "actions": {
          "rollover": {
            "max_age": "1h",
            "max_size": "1mb"
          }
        }
      },
      "warm": {
        "actions": {}
      },
      "delete": {
        "min_age": "3h",
        "actions": {
          "delete": {}
        }
      }
    }
  }
}

```

My requirement is to create a index with name sample-00001 and every hour it has to rollover to the newer index sample-00002. In the third hour it has to rollover to sample-00003 and so on. At any given time, I need to keep two Indices : sample-0000n and sample-00000n+1

However, I could only see that the index management policy created only the first rollover sample-00002 and then it stopped.

Template :

```auto
PUT _template/template_1
{
    "index_patterns" : ["sample*"],
    "settings" : {
        "number_of_shards" : 1
    },
    "aliases" : {
        "{index}-alias" : {} 
    }
}

```

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/4/644fb456d6353b549395ee769a2d4ae3b8691560.png)

Looks like the above mentioned index management policy go applied only to sample-000001 index. Could someone help me achieve this continuous rollover?

Thanks,  
Somebody

---

<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:** [April 15, 2020, 5:16pm UTC](https://discuss.elastic.co/t/index-management-rollover-not-working/224162/2 "2020-04-15T17:16:38Z")

</div>

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