# Index lifecycle error - illegal\_argument\_exception: index.lifecycle.rollover\_alias

**URL:** <https://discuss.elastic.co/t/index-lifecycle-error-illegal-argument-exception-index-lifecycle-rollover-alias/207900>\
**Category:** Kibana\
**Tags:** ilm-index-lifecycle-management\
**Created:** [November 14, 2019, 1:08pm UTC](https://discuss.elastic.co/t/index-lifecycle-error-illegal-argument-exception-index-lifecycle-rollover-alias/207900 "2019-11-14T13:08:42Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![BALA\_BALA](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bala_bala/32/44655_2.png) [@BALA\_BALA](https://discuss.elastic.co/u/BALA_BALA)\
**Post date:** [November 14, 2019, 1:08pm UTC](https://discuss.elastic.co/t/index-lifecycle-error-illegal-argument-exception-index-lifecycle-rollover-alias/207900/1 "2019-11-14T13:08:42Z")

</div>

Hello Team,

Could you please help me with sorting out the following error while implementing ILM?

Referred link  
[https://www.elastic.co/guide/en/elasticsearch/reference/7.4/getting-started-index-lifecycle-management.html](https://www.elastic.co/guide/en/elasticsearch/reference/7.4/getting-started-index-lifecycle-management.html)

Index lifecycle error  
illegal\_argument\_exception: index.lifecycle.rollover\_alias [temprule] does not point to index [templogs-2019.11]

**Current action**  
rollover  
**Failed step**  
check-rollover-ready  
**Current phase**  
hot

Show phase definition

{  
"index.blocks.read\_only\_allow\_delete": "false",  
"index.priority": "1",  
"index.query.default\_field": [  
"\*"  
],  
"index.refresh\_interval": "1s",  
"index.write.wait\_for\_active\_shards": "1",  
"index.lifecycle.name": "LOG\_POLICY",  
"index.lifecycle.rollover\_alias": "temprule",  
"index.number\_of\_replicas": "1"  
}

PHASE DEFINITION  
{  
"policy": "LOG\_POLICY",  
"phase\_definition": {  
"min\_age": "0ms",  
"actions": {  
"rollover": {  
"max\_size": "5mb",  
"max\_age": "7d"  
}  
}  
},  
"version": 10,  
"modified\_date\_in\_millis": 1572509374925  
}

---

<div class="post-metadata">

**Author:** ![rashmi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rashmi/32/16391_2.png) [@rashmi](https://discuss.elastic.co/u/rashmi)\
**Post date:** [November 14, 2019, 4:20pm UTC](https://discuss.elastic.co/t/index-lifecycle-error-illegal-argument-exception-index-lifecycle-rollover-alias/207900/2 "2019-11-14T16:20:44Z")

</div>

@cufflinks /@alisongoryachev can u please help here?

Thanks  
Rashmi

---

<div class="post-metadata">

**Author:** ![alisongoryachev](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alisongoryachev/32/111352_2.png) [@alisongoryachev](https://discuss.elastic.co/u/alisongoryachev)\
**Post date:** [November 15, 2019, 2:47pm UTC](https://discuss.elastic.co/t/index-lifecycle-error-illegal-argument-exception-index-lifecycle-rollover-alias/207900/3 "2019-11-15T14:47:59Z")

</div>

Welcome @BALA_BALA!

Does the alias `temprule` exist? Also, if you created the alias _after_ the ILM policy, you may also hit this issue (see: [https://github.com/elastic/elasticsearch/issues/40235](https://github.com/elastic/elasticsearch/issues/40235)).

---

<div class="post-metadata">

**Author:** ![BALA\_BALA](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bala_bala/32/44655_2.png) [@BALA\_BALA](https://discuss.elastic.co/u/BALA_BALA)\
**Post date:** [November 18, 2019, 2:12am UTC](https://discuss.elastic.co/t/index-lifecycle-error-illegal-argument-exception-index-lifecycle-rollover-alias/207900/4 "2019-11-18T02:12:02Z")

</div>

Thanks for the warm welcome 🙂 Let me review the link .

---

<div class="post-metadata">

**Author:** ![BALA\_BALA](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bala_bala/32/44655_2.png) [@BALA\_BALA](https://discuss.elastic.co/u/BALA_BALA)\
**Post date:** [November 27, 2019, 2:43am UTC](https://discuss.elastic.co/t/index-lifecycle-error-illegal-argument-exception-index-lifecycle-rollover-alias/207900/5 "2019-11-27T02:43:32Z")

</div>

Hi Alison,

Rollover job getting struck with this error....do i miss anything?  
Index lifecycle error " illegal\_argument\_exception: index name [logrules-2019.11] does not match pattern '^.\*-\d+$' "

---

<div class="post-metadata">

**Author:** ![BALA\_BALA](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bala_bala/32/44655_2.png) [@BALA\_BALA](https://discuss.elastic.co/u/BALA_BALA)\
**Post date:** [November 28, 2019, 7:26am UTC](https://discuss.elastic.co/t/index-lifecycle-error-illegal-argument-exception-index-lifecycle-rollover-alias/207900/6 "2019-11-28T07:26:25Z")

</div>

Log & setting details,

{  
"indices" : {  
"logrules-2019.11" : {  
"index" : "logrules-2019.11",  
"managed" : true,  
"policy" : "PEGA\_LOG\_POLICY",  
"lifecycle\_date\_millis" : 1572566420875,  
"phase" : "hot",  
"phase\_time\_millis" : 1574920014790,  
"action" : "rollover",  
"action\_time\_millis" : 1574920254325,  
"step" : "ERROR",  
"step\_time\_millis" : 1574920854159,  
"failed\_step" : "check-rollover-ready",  
"step\_info" : {  
"type" : "illegal\_argument\_exception",  
"reason" : "index name [logrules-2019.11] does not match pattern '^.\*-\d+'", "stack\_trace" : """ java.lang.IllegalArgumentException: index name [logrules-2019.11] does not match pattern '^.\*-\d+'  
at org.elasticsearch.action.admin.indices.rollover.TransportRolloverAction.generateRolloverIndexName(TransportRolloverAction.java:245)  
at org.elasticsearch.action.admin.indices.rollover.TransportRolloverAction.masterOperation(TransportRolloverAction.java:128)  
at org.elasticsearch.action.admin.indices.rollover.TransportRolloverAction.masterOperation(TransportRolloverAction.java:70)  
at org.elasticsearch.action.support.master.TransportMasterNodeAction.masterOperation(TransportMasterNodeAction.java:127)  
at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction$1.doRun(TransportMasterNodeAction.java:200)  
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)  
at org.elasticsearch.common.util.concurrent.EsExecutors$DirectExecutorService.execute(EsExecutors.java:193)  
at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction.doStart(TransportMasterNodeAction.java:197)  
at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction.start(TransportMasterNodeAction.java:161)  
at org.elasticsearch.action.support.master.TransportMasterNodeAction.doExecute(TransportMasterNodeAction.java:138)  
at org.elasticsearch.action.support.master.TransportMasterNodeAction.doExecute(TransportMasterNodeAction.java:58)  
at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:145)  
at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.lambda$apply$0(SecurityActionFilter.java:86)  
at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:62)  
at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.lambda$authorizeRequest$4(SecurityActionFilter.java:172)  
at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:62)  
at org.elasticsearch.xpack.security.authz.AuthorizationService.lambda$runRequestInterceptors$15(AuthorizationService.java:341)  
at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:62)

Setting:

{  
"index.blocks.read\_only\_allow\_delete": "false",  
"index.query.default\_field": [  
"\*"  
],  
"index.refresh\_interval": "1s",  
"index.write.wait\_for\_active\_shards": "1",  
"index.lifecycle.name": "PEGA\_LOG\_POLICY",  
"index.lifecycle.rollover\_alias": "pega\_log-000001",  
"index.priority": "100",  
"index.number\_of\_replicas": "1"  
}

---

<div class="post-metadata">

**Author:** ![dakrone](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dakrone/32/23351_2.png) [@dakrone](https://discuss.elastic.co/u/dakrone)\
**Post date:** [December 2, 2019, 3:37pm UTC](https://discuss.elastic.co/t/index-lifecycle-error-illegal-argument-exception-index-lifecycle-rollover-alias/207900/7 "2019-12-02T15:37:15Z")

</div>

> [@BALA\_BALA](#):
>
> illegal\_argument\_exception: index name [logrules-2019.11] does not match pattern '^.\*-\d+$' "

Your index name (`logrules-2019.11`) doesn't have a `-0000N` (where N is a digit) suffix, which is required to use rollover. When the initial index is created, it should be created as `logrules-2019.11-000001` so that the rollover API can increment the number at the end.

---

<div class="post-metadata">

**Author:** ![BALA\_BALA](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bala_bala/32/44655_2.png) [@BALA\_BALA](https://discuss.elastic.co/u/BALA_BALA)\
**Post date:** [December 3, 2019, 6:09am UTC](https://discuss.elastic.co/t/index-lifecycle-error-illegal-argument-exception-index-lifecycle-rollover-alias/207900/8 "2019-12-03T06:09:47Z")

</div>

Excellent. No more errors..

### Index lifecycle management

**Lifecycle policy**

[PEGA\_LOG\_POLICY](https://esokibana-prod.flex.com/app/kibana#/management/elasticsearch/index_lifecycle_management/policies/edit/PEGA_LOG_POLICY)

**Current action**

complete

**Failed step**

- 

**Current phase**

hot

**Current action time**

2019-12-03 11:04:45

Show phase definition

---

<div class="post-metadata">

**Author:** ![realyn\_elastic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/realyn_elastic/32/47247_2.png) [@realyn\_elastic](https://discuss.elastic.co/u/realyn_elastic)\
**Post date:** [December 3, 2019, 1:59pm UTC](https://discuss.elastic.co/t/index-lifecycle-error-illegal-argument-exception-index-lifecycle-rollover-alias/207900/9 "2019-12-03T13:59:43Z")

</div>

How can I resolve it, how can I have the -000N on my index name. I am facing same situation

---

<div class="post-metadata">

**Author:** ![rashmi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rashmi/32/16391_2.png) [@rashmi](https://discuss.elastic.co/u/rashmi)\
**Post date:** [December 12, 2019, 8:16pm UTC](https://discuss.elastic.co/t/index-lifecycle-error-illegal-argument-exception-index-lifecycle-rollover-alias/207900/10 "2019-12-12T20:16:47Z")

</div>

excellant THanks for circling back and letting us know.

---

<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:** [January 9, 2020, 8:16pm UTC](https://discuss.elastic.co/t/index-lifecycle-error-illegal-argument-exception-index-lifecycle-rollover-alias/207900/11 "2020-01-09T20:16:54Z")

</div>

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