Hi,
I am using my previous action.yml and config.yml of curator to delete old indices of elasticsearch. I have installed python 3.7.2 and curator 5.6.
My config is:
cat config.yml
client:
hosts:
- 127.0.0.1
port: 9200
url_prefix:
use_ssl: False
certificate:
client_cert:
client_key:
ssl_no_validate: False
http_auth:
timeout: 30
master_only: False
logging:
loglevel: INFO
logfile:
logformat: default
blacklist: ['elasticsearch', 'urllib3']
And my action.yml is:
cat action.yml
actions:
1:
action: delete_indices
description: >-
Delete indices older than 90 days (based on index name), for logstash-
prefixed indices. Ignore the error if the filter does not result in an
actionable list of indices (ignore_empty_list) and exit cleanly.
options:
ignore_empty_list: True
timeout_override:
continue_if_exception: False
disable_action: True
filters:
- filtertype: pattern
kind: prefix
value: logstash-
exclude:
- filtertype: age
source: name
direction: older
timestring: '%Y.%m.%d'
unit: days
unit_count: 90
exclude:
When I do dry run:
/opt/python3/bin/curator --config /opt/elk/curator/config.yml --dry-run /opt/elk/curator/action.yml
I get following error:
/opt/python3/lib/python3.7/site-packages/curator/utils.py:53: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
return yaml.load(read_file(path))
2019-04-05 07:52:44,389 ERROR Schema error: extra keys not allowed @ data['exclude']
Traceback (most recent call last):
File "/opt/python3/lib/python3.7/site-packages/curator/validators/schemacheck.py", line 57, in result
return self.schema(self.config)
File "/opt/python3/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 267, in __call__
return self._compiled([], data)
File "/opt/python3/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 589, in validate_dict
return base_validate(path, iteritems(data), out)
File "/opt/python3/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 427, in validate_mapping
raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: extra keys not allowed @ data['exclude']
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/python3/bin/curator", line 11, in <module>
sys.exit(cli())
File "/opt/python3/lib/python3.7/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/opt/python3/lib/python3.7/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/opt/python3/lib/python3.7/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/python3/lib/python3.7/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/opt/python3/lib/python3.7/site-packages/curator/cli.py", line 213, in cli
run(config, action_file, dry_run)
File "/opt/python3/lib/python3.7/site-packages/curator/cli.py", line 119, in run
action_dict = validate_actions(action_config)
File "/opt/python3/lib/python3.7/site-packages/curator/utils.py", line 1399, in validate_actions
root = SchemaCheck(data, actions.root(), 'Actions File', 'root').result()
File "/opt/python3/lib/python3.7/site-packages/curator/validators/schemacheck.py", line 69, in result
self.test_what, self.location, self.badvalue, self.error)
curator.exceptions.ConfigurationError: Configuration: Actions File: Location: root: Bad Value: "None", extra keys not allowed @ data['exclude']. Check configuration file.
Can someone please guide me to resolve it ?
Regards,
-Manish