# Using rollover got error

**URL:** https://discuss.elastic.co/t/using-rollover-got-error/84869
**Category:** Elasticsearch
**Created:** [May 8, 2017, 3:31am UTC](https://discuss.elastic.co/t/using-rollover-got-error/84869 "2017-05-08T03:31:05Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![flyfish](https://avatars.discourse-cdn.com/v4/letter/f/ea5d25/32.png) [@flyfish](https://discuss.elastic.co/u/flyfish)
#### Post date: [May 8, 2017, 3:31am UTC](https://discuss.elastic.co/t/using-rollover-got-error/84869/1 "2017-05-08T03:31:05Z")

</div>

Hi,

I just created an alias which name is "squid-log-alias" for my index "squid-log", and when I setup rollover API and I got the error:

POST /squid-log-alias/\_rollover  
{  
"conditions":{  
"max\_age": "7d",  
"max\_docs": 1000  
}

}

{  
"error": {  
"root\_cause": [  
{  
"type": "illegal\_argument\_exception",  
"reason": "index name [squid-log] does not match pattern '^._-\d+$'"  
}  
],  
"type": "illegal\_argument\_exception",  
"reason": "index name [squid-log] does not match pattern '^._-\d+$'"  
},  
"status": 400  
}

Do you know how?

---

<div class="post-metadata">

### Author: ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)
#### Post date: [May 8, 2017, 4:09am UTC](https://discuss.elastic.co/t/using-rollover-got-error/84869/2 "2017-05-08T04:09:27Z")

</div>

The index behind the alias needs to end in an incrementable number. See [https://www.elastic.co/guide/en/elasticsearch/reference/5.4/indices-rollover-index.html](https://www.elastic.co/guide/en/elasticsearch/reference/5.4/indices-rollover-index.html)

---

<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: [June 5, 2017, 4:19am UTC](https://discuss.elastic.co/t/using-rollover-got-error/84869/3 "2017-06-05T04:19:02Z")

</div>

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