# Schema error: extra keys not allowed @ data\['action'\] using curator for rollover api

**URL:** <https://discuss.elastic.co/t/schema-error-extra-keys-not-allowed-data-action-using-curator-for-rollover-api/197072>\
**Category:** Elasticsearch\
**Created:** [August 28, 2019, 8:48am UTC](https://discuss.elastic.co/t/schema-error-extra-keys-not-allowed-data-action-using-curator-for-rollover-api/197072 "2019-08-28T08:48:32Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![yestoprince](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yestoprince/32/94122_2.png) [@yestoprince](https://discuss.elastic.co/u/yestoprince)\
**Post date:** [August 28, 2019, 8:48am UTC](https://discuss.elastic.co/t/schema-error-extra-keys-not-allowed-data-action-using-curator-for-rollover-api/197072/1 "2019-08-28T08:48:32Z")

</div>

action file

action: rollover  
description: \>-  
Rollover the index associated with alias 'aliasname', which should be in the  
form of prefix-YYYY.MM.DD-1.  
options:  
name: aliasname  
new\_indices: "\<logstash-{now/d{YYYY.MM.dd|+12:00}}\>"  
conditions:  
max\_age: 1d  
max\_docs: 1000000  
max\_size: 5gb  
extra\_settings:  
index.number\_of\_shards: 3  
index.number\_of\_replicas: 1  
timeout\_override:  
continue\_if\_exception: False  
disable\_action: False

Any one know what could be the reason of the error

Here is the detailed error

self.test\_what, self.location, self.badvalue, self.error)

curator.exceptions.ConfigurationError: Configuration: Actions File: Location: root: Bad Value: "rollover", extra keys not allowed @ data['action']. Check configuration file.

---

<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:** [August 28, 2019, 1:44pm UTC](https://discuss.elastic.co/t/schema-error-extra-keys-not-allowed-data-action-using-curator-for-rollover-api/197072/2 "2019-08-28T13:44:04Z")

</div>

Not sure what your action file actually looks like, as it's pasted without indents. To properly paste configuration files or snippets in Discuss, always encapsulate them between triple back ticks, like this:

````
```
PASTE HERE
```

````

I can tell you what this _should_ look like, however:

```auto
---
actions:
  1:
    action: rollover
    description: >-
      Rollover the index associated with alias 'aliasname', which should be in the
      form of prefix-YYYY.MM.DD-1.
    options:
      name: aliasname
      new_indices: "<logstash-{now/d{YYYY.MM.dd|+12:00}}>"
      conditions:
        max_age: 1d
        max_docs: 1000000
        max_size: 5gb
      extra_settings:
        index.number_of_shards: 3
        index.number_of_replicas: 1
      timeout_override:
      continue_if_exception: False
      disable_action: False

```

Based on the error you posted, it appears that you are missing the portion at the top:

```auto
---
actions:
  1:

```

This is still part of the action file. The `---` means you're telling the YAML interpreter to expect YAML. It's not strictly necessary, but does allow for comment lines to be used at the top of the file. `actions:` needs to be at the root level, completely unindented. And a numeric value, e.g. `1:`, needs to be indented slightly from there, with the action block you added properly indented after that.

For an example of a Rollover action file, please see [https://www.elastic.co/guide/en/elasticsearch/client/curator/current/ex\_rollover.html](https://www.elastic.co/guide/en/elasticsearch/client/curator/current/ex_rollover.html)

---

<div class="post-metadata">

**Author:** ![yestoprince](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yestoprince/32/94122_2.png) [@yestoprince](https://discuss.elastic.co/u/yestoprince)\
**Post date:** [September 3, 2019, 10:03am UTC](https://discuss.elastic.co/t/schema-error-extra-keys-not-allowed-data-action-using-curator-for-rollover-api/197072/5 "2019-09-03T10:03:34Z")

</div>

I am not sure why i am not be able to perform the rollover action using curator, whats wrong i am doing ?

---

<div class="post-metadata">

**Author:** ![yestoprince](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yestoprince/32/94122_2.png) [@yestoprince](https://discuss.elastic.co/u/yestoprince)\
**Post date:** [September 3, 2019, 10:25am UTC](https://discuss.elastic.co/t/schema-error-extra-keys-not-allowed-data-action-using-curator-for-rollover-api/197072/6 "2019-09-03T10:25:01Z")

</div>

![34%20PM](https://us1.discourse-cdn.com/elastic/original/3X/9/c/9ce6820864a28e0815ad7beacfa55729d1471156.png)

---

<div class="post-metadata">

**Author:** ![yestoprince](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yestoprince/32/94122_2.png) [@yestoprince](https://discuss.elastic.co/u/yestoprince)\
**Post date:** [September 3, 2019, 10:25am UTC](https://discuss.elastic.co/t/schema-error-extra-keys-not-allowed-data-action-using-curator-for-rollover-api/197072/7 "2019-09-03T10:25:32Z")

</div>

root@de-elasticsearch-prince-one:/usr/local/bin# curator --config curator.yml rollover\_indices.yml  
2019-09-03 10:23:33,658 ERROR Schema error: extra keys not allowed @ data['new\_indices']  
Traceback (most recent call last):  
File "/usr/local/bin/curator", line 11, in   
sys.exit(cli())  
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in **call**  
return self.main(\*args, \*\*kwargs)  
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main  
rv = self.invoke(ctx)  
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke  
return ctx.invoke(self.callback, \*\*ctx.params)  
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke  
return callback(\*args, \*\*kwargs)  
File "/usr/local/lib/python2.7/dist-packages/curator/cli.py", line 218, in cli  
run(config, action\_file, dry\_run)  
File "/usr/local/lib/python2.7/dist-packages/curator/cli.py", line 119, in run  
action\_dict = validate\_actions(action\_config)  
File "/usr/local/lib/python2.7/dist-packages/curator/utils.py", line 1426, in validate\_actions  
loc  
File "/usr/local/lib/python2.7/dist-packages/curator/validators/schemacheck.py", line 69, in result  
self.test\_what, self.location, self.badvalue, self.error)  
curator.exceptions.ConfigurationError: Configuration: options: Location: Action ID "1", action "rollover": Bad Value: "\<logstash-{now/d{YYYY.MM.dd|+12:00}}\>", extra keys not allowed @ data['new\_indices']. Check configuration file.

---

<div class="post-metadata">

**Author:** ![yestoprince](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yestoprince/32/94122_2.png) [@yestoprince](https://discuss.elastic.co/u/yestoprince)\
**Post date:** [September 3, 2019, 10:26am UTC](https://discuss.elastic.co/t/schema-error-extra-keys-not-allowed-data-action-using-curator-for-rollover-api/197072/8 "2019-09-03T10:26:03Z")

</div>

Can you please help why still it is not working...

---

<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:** [September 3, 2019, 4:35pm UTC](https://discuss.elastic.co/t/schema-error-extra-keys-not-allowed-data-action-using-curator-for-rollover-api/197072/9 "2019-09-03T16:35:04Z")

</div>

I gave an express example of how to paste pre-formatted text, and you shared a screen shot. Please do not do this, as the screen shots are not copy/paste-able.

The error is clearly because `new_indices` is not valid. The option should be [`new_index`](https://www.elastic.co/guide/en/elasticsearch/client/curator/5.7/option_new_index.html), as you are only creating one index at rollover.

---

<div class="post-metadata">

**Author:** ![yestoprince](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yestoprince/32/94122_2.png) [@yestoprince](https://discuss.elastic.co/u/yestoprince)\
**Post date:** [September 13, 2019, 6:55am UTC](https://discuss.elastic.co/t/schema-error-extra-keys-not-allowed-data-action-using-curator-for-rollover-api/197072/10 "2019-09-13T06:55:37Z")

</div>

Thanks for the help. but i think i cannot rollover an index based on the size without having a basic license

---

<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:** [September 13, 2019, 12:47pm UTC](https://discuss.elastic.co/t/schema-error-extra-keys-not-allowed-data-action-using-curator-for-rollover-api/197072/11 "2019-09-13T12:47:46Z")

</div>

There is no such license restriction. The Rollover API does not require even a Basic license.

---

<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:** [October 11, 2019, 12:47pm UTC](https://discuss.elastic.co/t/schema-error-extra-keys-not-allowed-data-action-using-curator-for-rollover-api/197072/12 "2019-10-11T12:47:53Z")

</div>

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