# Index not rolling over

**URL:** https://discuss.elastic.co/t/index-not-rolling-over/183603
**Category:** Elasticsearch
**Created:** [May 30, 2019, 8:14pm UTC](https://discuss.elastic.co/t/index-not-rolling-over/183603 "2019-05-30T20:14:32Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![xyz2](https://avatars.discourse-cdn.com/v4/letter/x/e480ec/32.png) [@xyz2](https://discuss.elastic.co/u/xyz2)
#### Post date: [May 30, 2019, 8:14pm UTC](https://discuss.elastic.co/t/index-not-rolling-over/183603/1 "2019-05-30T20:14:33Z")

</div>

Hi  
I performed below steps as per [https://github.com/elastic/kibana/issues/27967](https://github.com/elastic/kibana/issues/27967)  
Index rolls over only once but not after that.

I have logstash setup with ilm settings as below

ilm\_enabled =\> true  
ilm\_rollover\_alias =\> "my\_index\_alias"  
ilm\_pattern =\> "000001"  
ilm\_policy =\> "my\_policy"

The ilm/explain command for first index says complete status and managed:true  
For 2nd index, managed:false  
And 3rd index is not created at all

Is there something else that needs to be set ??

---

<div class="post-metadata">

### Author: ![gbrown](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gbrown/32/34482_2.png) [@gbrown](https://discuss.elastic.co/u/gbrown)
#### Post date: [May 30, 2019, 10:26pm UTC](https://discuss.elastic.co/t/index-not-rolling-over/183603/2 "2019-05-30T22:26:10Z")

</div>

This sounds similar to what occurs when an ILM policy with Rollover is used, but the index template either doesn't exist or doesn't have `index.lifecycle.name` set.

Could you post the index template that's being used for your indices? Do you have any of `template`, `manage_template`, or `template_overwrite` set in your Logstash output config? Have you manually changed the index template that Logstash installs?

---

<div class="post-metadata">

### Author: ![xyz2](https://avatars.discourse-cdn.com/v4/letter/x/e480ec/32.png) [@xyz2](https://discuss.elastic.co/u/xyz2)
#### Post date: [May 31, 2019, 5:27pm UTC](https://discuss.elastic.co/t/index-not-rolling-over/183603/3 "2019-05-31T17:27:29Z")

</div>

It has index template with below properties included in setting  
"index.lifecycle.name": "my\_policy",  
"index.lifecycle.rollover\_alias": "my\_index\_alias"

---

<div class="post-metadata">

### Author: ![jakelandis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jakelandis/32/36163_2.png) [@jakelandis](https://discuss.elastic.co/u/jakelandis)
#### Post date: [May 31, 2019, 6:12pm UTC](https://discuss.elastic.co/t/index-not-rolling-over/183603/4 "2019-05-31T18:12:49Z")

</div>

Can you share the output the following for anything that has logstash in the name ?

```auto
GET _cat/templates?v
GET _template/<name of template that matches logstash indexes>

```

---

<div class="post-metadata">

### Author: ![xyz2](https://avatars.discourse-cdn.com/v4/letter/x/e480ec/32.png) [@xyz2](https://discuss.elastic.co/u/xyz2)
#### Post date: [June 3, 2019, 5:50pm UTC](https://discuss.elastic.co/t/index-not-rolling-over/183603/5 "2019-06-03T17:50:01Z")

</div>

{

```
"index_patterns": ["my_index-*"],

"settings": {

	"number_of_shards": 1,

    "number_of_replicas": 1,

   

    "index.lifecycle.name": "my_policy",

    "index.lifecycle.rollover_alias": "my_index_alias"   

    

}

```

}

Have set below template and template\_name in logstash output.  
template\_name =\> "test\_template"  
template =\> "/home/user1/test-template.json" along with  
ilm\_enabled =\> true  
ilm\_rollover\_alias =\> "my\_index\_alias"  
ilm\_pattern =\> "000001"  
ilm\_policy =\> "my\_policy"

---

<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: [July 1, 2019, 5:50pm UTC](https://discuss.elastic.co/t/index-not-rolling-over/183603/6 "2019-07-01T17:50:02Z")

</div>

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