# Curator delete\_indices curator.validators.SchemaCheck result:65 Schema error: extra keys not allowed @ data\['filter'\]

**URL:** <https://discuss.elastic.co/t/curator-delete-indices-curator-validators-schemacheck-result-65-schema-error-extra-keys-not-allowed-data-filter/174416>\
**Category:** Elasticsearch\
**Tags:** curator\
**Created:** [March 28, 2019, 7:21pm UTC](https://discuss.elastic.co/t/curator-delete-indices-curator-validators-schemacheck-result-65-schema-error-extra-keys-not-allowed-data-filter/174416 "2019-03-28T19:21:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ryan\_Downey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ryan_downey/32/35987_2.png) [@Ryan\_Downey](https://discuss.elastic.co/u/Ryan_Downey)\
**Post date:** [March 28, 2019, 7:21pm UTC](https://discuss.elastic.co/t/curator-delete-indices-curator-validators-schemacheck-result-65-schema-error-extra-keys-not-allowed-data-filter/174416/1 "2019-03-28T19:21:41Z")

</div>

When testing Curator I get an error; Schema error: extra keys not allowed @ data['filter'], and I can't seem to fix the issue. A primary reference for this has been the thread [Curator field\_stats doesn't work](https://discuss.elastic.co/t/curator-field-stats-doesnt-work/147619) but unfortuantley it doesnt have a solution.

I've got the same error and I can't find any syntactic or indentation issues in my action\_file. Below is my action file and the error message after sudo curator --config curator.yml --dry-run action\_file.yml is run. Double checked my yaml on [https://codebeautify.org/yaml-validator](https://codebeautify.org/yaml-validator) and it validated. Appreciate any help.

```auto
actions:
  1:
    action: delete_indices
    description: >-
      Delete indices that are more than 14 days old on nodes abc, def and ghi in our QA environment.
      The indices that are currently marked for deletion under this format are metricbeat- and packetbeat-.

    options:
      ignore_empty_list: True
      timeout_override:
      continue_if_exception: True

    filter:
    - filtertype: pattern
      kind: prefix
      value: metricbeat-
    - filtertype: age
      source: name
      direction: older
      timestring: '%Y.%m.%d'
      unit: days
      unit_count: 14

```

```auto
2019-03-28 14:59:34,291 DEBUG curator.cli run:108 Client and logging options validated.
2019-03-28 14:59:34,291 DEBUG curator.cli run:112 default_timeout = 30
2019-03-28 14:59:34,291 DEBUG curator.cli run:116 action_file: action_file.yml
2019-03-28 14:59:34,297 DEBUG curator.cli run:118 action_config: {'actions': {1: {'action': 'delete_indices', 'description': 'Delete indices that are more than 14 days old on nodes dch1088, dch1089 and dch1090 in our QA environment. The indices that are currently marked for deletion under this format are metricbeat- and packetbeat-. ', 'options': {'ignore_empty_list': True, 'timeout_override': None, 'continue_if_exception': True}, 'filter': [{'filtertype': 'pattern', 'kind': 'prefix', 'value': 'metricbeat-'}, {'filtertype': 'age', 'source': 'name', 'direction': 'older', 'timestring': '%Y.%m.%d', 'unit': 'days', 'unit_count': 14}]}}}
2019-03-28 14:59:34,297 DEBUG curator.validators.SchemaCheck __init__ :26 Schema: {'actions': <class 'dict'>}
2019-03-28 14:59:34,297 DEBUG curator.validators.SchemaCheck __init__ :27 "Actions File" config: {'actions': {1: {'action': 'delete_indices', 'description': 'Delete indices that are more than 14 days old on nodes dch1088, dch1089 and dch1090 in our QA environment. The indices that are currently marked for deletion under this format are metricbeat- and packetbeat-. ', 'options': {'ignore_empty_list': True, 'timeout_override': None, 'continue_if_exception': True}, 'filter': [{'filtertype': 'pattern', 'kind': 'prefix', 'value': 'metricbeat-'}, {'filtertype': 'age', 'source': 'name', 'direction': 'older', 'timestring': '%Y.%m.%d', 'unit': 'days', 'unit_count': 14}]}}}
2019-03-28 14:59:34,298 DEBUG curator.validators.SchemaCheck __init__ :26 Schema: {'action': Any(In(['alias', 'allocation', 'close', 'cluster_routing', 'create_index', 'delete_indices', 'delete_snapshots', 'forcemerge', 'index_settings', 'open', 'reindex', 'replicas', 'restore', 'rollover', 'shrink', 'snapshot']), msg="action must be one of ['alias', 'allocation', 'close', 'cluster_routing', 'create_index', 'delete_indices', 'delete_snapshots', 'forcemerge', 'index_settings', 'open', 'reindex', 'replicas', 'restore', 'rollover', 'shrink', 'snapshot']")}
2019-03-28 14:59:34,298 DEBUG curator.validators.SchemaCheck __init__ :27 "action type" config: {'action': 'delete_indices', 'description': 'Delete indices that are more than 14 days old on nodes dch1088, dch1089 and dch1090 in our QA environment. The indices that are currently marked for deletion under this format are metricbeat- and packetbeat-. ', 'options': {'ignore_empty_list': True, 'timeout_override': None, 'continue_if_exception': True}, 'filter': [{'filtertype': 'pattern', 'kind': 'prefix', 'value': 'metricbeat-'}, {'filtertype': 'age', 'source': 'name', 'direction': 'older', 'timestring': '%Y.%m.%d', 'unit': 'days', 'unit_count': 14}]}
2019-03-28 14:59:34,299 DEBUG curator.validators.SchemaCheck __init__ :26 Schema: {'action': Any(In(['alias', 'allocation', 'close', 'cluster_routing', 'create_index', 'delete_indices', 'delete_snapshots', 'forcemerge', 'index_settings', 'open', 'reindex', 'replicas', 'restore', 'rollover', 'shrink', 'snapshot']), msg="action must be one of ['alias', 'allocation', 'close', 'cluster_routing', 'create_index', 'delete_indices', 'delete_snapshots', 'forcemerge', 'index_settings', 'open', 'reindex', 'replicas', 'restore', 'rollover', 'shrink', 'snapshot']"), 'description': Any(<class 'str'>, <class 'str'>, msg=None), 'options': <class 'dict'>, 'filters': <class 'list'>}
2019-03-28 14:59:34,299 DEBUG curator.validators.SchemaCheck __init__ :27 "structure" config: {'action': 'delete_indices', 'description': 'Delete indices that are more than 14 days old on nodes dch1088, dch1089 and dch1090 in our QA environment. The indices that are currently marked for deletion under this format are metricbeat- and packetbeat-. ', 'options': {'ignore_empty_list': True, 'timeout_override': None, 'continue_if_exception': True}, 'filter': [{'filtertype': 'pattern', 'kind': 'prefix', 'value': 'metricbeat-'}, {'filtertype': 'age', 'source': 'name', 'direction': 'older', 'timestring': '%Y.%m.%d', 'unit': 'days', 'unit_count': 14}]}
2019-03-28 14:59:34,299 ERROR curator.validators.SchemaCheck result:65 Schema error: extra keys not allowed @ data['filter']

```

---

<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:** [March 28, 2019, 7:51pm UTC](https://discuss.elastic.co/t/curator-delete-indices-curator-validators-schemacheck-result-65-schema-error-extra-keys-not-allowed-data-filter/174416/2 "2019-03-28T19:51:43Z")

</div>

It should be plural: `filters`, rather than `filter`. See [this example](https://www.elastic.co/guide/en/elasticsearch/client/curator/5.6/ex_delete_indices.html).

---

<div class="post-metadata">

**Author:** ![Ryan\_Downey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ryan_downey/32/35987_2.png) [@Ryan\_Downey](https://discuss.elastic.co/u/Ryan_Downey)\
**Post date:** [March 28, 2019, 8:12pm UTC](https://discuss.elastic.co/t/curator-delete-indices-curator-validators-schemacheck-result-65-schema-error-extra-keys-not-allowed-data-filter/174416/3 "2019-03-28T20:12:04Z")

</div>

Aaahhh the infamous syntax error. You stare at something and double check it a hundred times with no luck lol. Had a few more errors pop up but I was able to work through those quickly. Appreciate the quick response Aaron, enjoy the rest of your day.

---

<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:** [April 25, 2019, 8:12pm UTC](https://discuss.elastic.co/t/curator-delete-indices-curator-validators-schemacheck-result-65-schema-error-extra-keys-not-allowed-data-filter/174416/4 "2019-04-25T20:12:08Z")

</div>

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