# Curator rollover new\_index

**URL:** <https://discuss.elastic.co/t/curator-rollover-new-index/187017>\
**Category:** Elasticsearch\
**Tags:** curator\
**Created:** [June 23, 2019, 6:05pm UTC](https://discuss.elastic.co/t/curator-rollover-new-index/187017 "2019-06-23T18:05:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![franktex](https://avatars.discourse-cdn.com/v4/letter/f/cdc98d/32.png) [@franktex](https://discuss.elastic.co/u/franktex)\
**Post date:** [June 23, 2019, 6:05pm UTC](https://discuss.elastic.co/t/curator-rollover-new-index/187017/1 "2019-06-23T18:05:56Z")

</div>

Hi,

Trying to get indices rolled over when it gets to a max\_size limit using a new index name that has the current date in the name of the index. Read online there is a undocumented feature called new\_index where you can use Date Math.

Keep getting this ERROR:

```
> 2019-06-23 18:52:30,462 DEBUG curator.utils parse_date_pattern:1348 Fully rendered name: <activemq-dev-{now/d}-1}>
> 2019-06-23 18:52:30,464 DEBUG curator.cli process_action:99 Doing the action here.
> 2019-06-23 18:52:30,464 INFO curator.actions.rollover do_action:969 Performing index rollover
> 2019-06-23 18:52:30,465 ERROR curator.cli run:191 Failed to complete action: rollover. <class 'curator.exceptions.FailedExecution'>: Exception encountered. Rerun with loglevel DEBUG and/or check Elasticsearch logs for more information. Exception: RequestError(400, u'no handler found for uri [/activemq-dev/_rollover/<activemq-dev-{now/d}-1}>?wait_for_active_shards=0&dry_run=false] and method [POST]', u'no handler found for uri [/activemq-dev/_rollover/<activemq-dev-{now/d}-1}>?wait_for_active_shards=0&dry_run=false] and method [POST]')

```

This is a snip of the configue

```
  1:
    action: rollover
    description: >-
      Rollover the index associated with alias 'aliasname', which should be in the
      format of prefix-000001 (or similar), or prefix-YYYY.MM.DD-1.
    options:
      name: activemq-dev
      new_index: '<activemq-dev-{now/d}-1}>'
      conditions:
        max_age: 1s
        max_docs: 1000000
        max_size: 5m
      extra_settings:
       index.number_of_shards: 5
       index.number_of_replicas: 1
      disable_action: False

```

Not sure why it's not creating the index, but not using date math the index gets created (example: activemq-dev-0000001)

Thanks

---

<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:** [June 28, 2019, 12:49am UTC](https://discuss.elastic.co/t/curator-rollover-new-index/187017/2 "2019-06-28T00:49:46Z")

</div>

Works for me.

## Create Rollover Index

```auto
PUT index-2019.06.27-1
{
  "aliases": {
    "index": {}
  }
}

```

## Rollover action.yml file

```auto
---
actions:
  1:
    action: rollover
    options:
      name: index
      new_index: '<index-{now/d}-1>'
      conditions:
        max_age: 1s
      extra_settings:
       index.number_of_shards: 1
       index.number_of_replicas: 1

```

## Log output

```auto
2019-06-27 19:46:00,856 DEBUG curator.actions.rollover log_result:923 Result: {'acknowledged': True, 'shards_acknowledged': True, 'old_index': 'index-2019.06.27-1', 'new_index': 'index-2019.06.28-1', 'rolled_over': True, 'dry_run': False, 'conditions': {'[max_age: 1s]': True}}
2019-06-27 19:46:00,857 INFO curator.actions.rollover log_result:937 Old index index-2019.06.27-1 rolled over to new index index-2019.06.28-1
2019-06-27 19:46:00,857 INFO curator.cli run:201 Action ID: 1, "rollover" completed.
2019-06-27 19:46:00,857 INFO curator.cli run:202 Job completed.

```

I think you have a trailing `}` character in `new_index: '<activemq-dev-{now/d}-1}>'`. Perhaps try it as:

```auto
new_index: '<activemq-dev-{now/d}-1>'

```

---

<div class="post-metadata">

**Author:** ![franktex](https://avatars.discourse-cdn.com/v4/letter/f/cdc98d/32.png) [@franktex](https://discuss.elastic.co/u/franktex)\
**Post date:** [July 14, 2019, 8:04am UTC](https://discuss.elastic.co/t/curator-rollover-new-index/187017/3 "2019-07-14T08:04:11Z")

</div>

> [@theuntergeek](#):
>
> \<index-{now/d}-1\>

Thanks for the response, indeed one of the issues was a typo the other was the curator.yml was configured to use a Nginx load balancer address port.

---

<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:** [August 11, 2019, 8:04am UTC](https://discuss.elastic.co/t/curator-rollover-new-index/187017/4 "2019-08-11T08:04:12Z")

</div>

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