# Rollover not happening after ilm policy set

**URL:** <https://discuss.elastic.co/t/rollover-not-happening-after-ilm-policy-set/251812>\
**Category:** Elasticsearch\
**Created:** [October 12, 2020, 8:47pm UTC](https://discuss.elastic.co/t/rollover-not-happening-after-ilm-policy-set/251812 "2020-10-12T20:47:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![venku](https://avatars.discourse-cdn.com/v4/letter/v/a698b9/32.png) [@venku](https://discuss.elastic.co/u/venku)\
**Post date:** [October 12, 2020, 8:47pm UTC](https://discuss.elastic.co/t/rollover-not-happening-after-ilm-policy-set/251812/1 "2020-10-12T20:47:28Z")

</div>

Hi, I am trying to setup an ilm policy for the index. I created the policy and attached it to the template. Used the same template in the logstash output. But I don't see the rollover happening.  
For testing purpose I have set `max_size` to `5mb` but size I see in Kibana dev when I query ES is around `13mb` already. Can someone please suggest what else I am missing to make this work?

Policy (name: ecom\_ilm\_policy)

```
{
  "policy": {
    "phases": {
      "hot": {
        "min_age": "0ms",
        "actions": {
          "rollover": {
            "max_age": "1d",
            "max_size": "5mb"
          },
          "set_priority": {
            "priority": null
          }
        }
      },
      "warm": {
        "min_age": "4d",
        "actions": {
          "set_priority": {
            "priority": null
          }
        }
      },
      "cold": {
        "min_age": "7d",
        "actions": {
          "set_priority": {
            "priority": null
          }
        }
      },
      "delete": {
        "min_age": "8d",
        "actions": {
          "delete": {}
        }
      }
    }
  }
}

```

My index template:

```
{
"index_patterns": ["ecom-*"],
  "template": {
  "settings": {
      "number_of_shards": 1,
      "index.lifecycle.name": "ecom_ilm_policy",
      "index.lifecycle.rollover_alias":"ecom"
    },
    "mappings": {
      "properties": {
        "timestamp": {
          "type": "date"
        },
		"level": {
          "type": "keyword"
        },
        "mdc.audit_id": {
          "type": "text",
          "index": false
        },
        "mdc.status": {
          "type": "keyword"
        },
        "mdc.instance_id": {
          "type": "text",
          "index": false
        },
        "mdc.url": {
          "type": "text"
        },
        "mdc.executionTime": {
          "type": "integer"
        },
		"thread": {
          "type": "keyword",
          "index": false
        },
		"logger": {
          "type": "text",
          "index": false
        },
		"message": {
          "type": "keyword"
        },
		"exception": {
          "type": "text"
        }
      }
    }
  },
  "priority": 51,
  "version": 1,
  "_meta": {
    "description": "my custom"
  }
}

```

Bootstrap the index with a write alias after creating the index template.  
`/ecom-000001`

```
{
  "aliases": {
    "ecom": {
      "is_write_index": true
    }
  }

```

}

Logstash Config:

```
input {
  redis {
    host => "172.17.0.2"
    key => "ecom"
    data_type => "list"
  }
}

output {

if "ecom_app" in [tags]{
  elasticsearch {
    hosts => ["eslocalhost:9200"]
    index => "ecom-app-logs"
    # manage_template => true
    # template_name => "ecom_template"
    ilm_enabled => true

  }
}
}
```

---

<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:** [November 9, 2020, 8:47pm UTC](https://discuss.elastic.co/t/rollover-not-happening-after-ilm-policy-set/251812/2 "2020-11-09T20:47:38Z")

</div>

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