Hi Aaron,
You were correct, when I tried using --dry-run before --config it took the cmd. But now I am getting different error.
my config.yml (curator config) is:
client:
hosts:
- 127.0.0.1
port: 9200
logging:
loglevel: INFO
logfile: "/var/log/curator/actions.log"
logformat: default
blacklist: ['elasticsearch', 'urllib3']
And my action.yml is:
actions:
1:
action: delete_indices
description: >-
Delete indices older than 10 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: False
filters:
- filtertype: pattern
kind: prefix
value: logstash-
exclude:
- filtertype: age
source: name
direction: older
timestring: '%Y.%m.%d'
unit: days
unit_count: 10
exclude:
When I execute curator I get following error.
[root@elk0 bin]# /elk/sw/python3.6.3/bin/curator --dry-run --config /elk/sw/elasticsearch-curator/config.yml /elk/sw/elasticsearch-curator/action.yml
Schema error: extra keys not allowed @ data['hosts']
Traceback (most recent call last):
_ File "/elk/sw/python3.6.3/lib/python3.6/site-packages/curator/validators/schemacheck.py", line 57, in result_
_ return self.schema(self.config)_
_ File "/elk/sw/python3.6.3/lib/python3.6/site-packages/voluptuous/schema_builder.py", line 221, in call_
_ return self.compiled([], data)
_ File "/elk/sw/python3.6.3/lib/python3.6/site-packages/voluptuous/schema_builder.py", line 538, in validate_dict_
_ return base_validate(path, iteritems(data), out)_
_ File "/elk/sw/python3.6.3/lib/python3.6/site-packages/voluptuous/schema_builder.py", line 370, in validate_mapping_
_ raise er.MultipleInvalid(errors)_
voluptuous.error.MultipleInvalid: extra keys not allowed @ data['hosts']
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
_ File "/elk/sw/python3.6.3/bin/curator", line 11, in _
_ load_entry_point('elasticsearch-curator==5.2.0', 'console_scripts', 'curator')()_
_ File "/elk/sw/python3.6.3/lib/python3.6/site-packages/click/core.py", line 722, in call_
_ return self.main(*args, **kwargs)_
_ File "/elk/sw/python3.6.3/lib/python3.6/site-packages/click/core.py", line 697, in main_
_ rv = self.invoke(ctx)_
_ File "/elk/sw/python3.6.3/lib/python3.6/site-packages/click/core.py", line 895, in invoke_
_ return ctx.invoke(self.callback, **ctx.params)_
_ File "/elk/sw/python3.6.3/lib/python3.6/site-packages/click/core.py", line 535, in invoke_
_ return callback(*args, **kwargs)_
_ File "/elk/sw/python3.6.3/lib/python3.6/site-packages/curator/cli.py", line 211, in cli_
_ run(config, action_file, dry_run)_
_ File "/elk/sw/python3.6.3/lib/python3.6/site-packages/curator/cli.py", line 106, in run_
_ client_args = process_config(config)_
_ File "/elk/sw/python3.6.3/lib/python3.6/site-packages/curator/config_utils.py", line 45, in process_config_
_ config = test_config(yaml_file)_
_ File "/elk/sw/python3.6.3/lib/python3.6/site-packages/curator/config_utils.py", line 19, in test_config_
_ 'Client Configuration', 'full configuration dictionary').result()_
_ File "/elk/sw/python3.6.3/lib/python3.6/site-packages/curator/validators/schemacheck.py", line 68, in result_
_ self.test_what, self.location, self.badvalue, self.error)_
curator.exceptions.ConfigurationError: Configuration: Client Configuration: Location: full configuration dictionary: Bad Value: "['127.0.0.1']", extra keys not allowed @ data['hosts']. Check configuration file.
Any idea how to fix this ? same action and config works well in curator 5.1.1
Regards,
-Manish