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 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 and it validated. Appreciate any help.
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
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']