# ILM stop working after deleting indexes manually

**URL:** <https://discuss.elastic.co/t/ilm-stop-working-after-deleting-indexes-manually/220033>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [February 19, 2020, 5:09pm UTC](https://discuss.elastic.co/t/ilm-stop-working-after-deleting-indexes-manually/220033 "2020-02-19T17:09:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![adnilote](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@adnilote](https://discuss.elastic.co/u/adnilote)\
**Post date:** [February 19, 2020, 5:09pm UTC](https://discuss.elastic.co/t/ilm-stop-working-after-deleting-indexes-manually/220033/1 "2020-02-19T17:09:00Z")

</div>

Hi, everyone!  
I successfully configured Index Lifecycle Policies: indexes are rollovered and old data are deleted. But I want to be able to manually delete indexes if needed from kibana.

# The problem

When I delete all indexes, new index is created without ilm policy and alias.

When add alias to index template, index recreation starts working, but rollover does not. (See section _Solution that I've tried_)

# My configurations:

- ELK stack v7.5.0
- Single-node cluster
- Metricbeat config:

> ...  
> setup.template.enabled: true  
> setup.template.overwrite: true  
> setup.template.json.enabled: true  
> setup.template.json.path: "fields.yml" # see later  
> setup.template.json.name: "metricbeat-stable-json-template"  
> setup.ilm.enabled: auto  
> setup.ilm.rollover\_alias: "metricbeat-stable"

- Index template (fields.yml):

> {  
> "order": 1,  
> "index\_patterns": [  
> "metricbeat-stable\*",  
> "metricbeat-stable-\*"  
> ],  
> "settings": {  
> "index": {  
> "lifecycle": {  
> "name": "metricbeat-policy",  
> "rollover\_alias": "metricbeat-stable"  
> }  
> }  
> }  
> }

# Solution that I've tried

I add alias to index template:

> {  
> "metricbeat-stable": {}  
> }

And index was successfully created, but rollover stops working. The error occur:

> illegal\_argument\_exception: Rollover alias [metricbeat-stable] can point to multiple indices, found duplicated alias [[metricbeat-stable]] in index template [metricbeat-stable]

So than I delete alias from index template and rollover starts working, but index recreation is not.

## Thanks in advance!

---

<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:** [March 18, 2020, 5:09pm UTC](https://discuss.elastic.co/t/ilm-stop-working-after-deleting-indexes-manually/220033/2 "2020-03-18T17:09:04Z")

</div>

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