I want to create a snapshot older than 30 days indices using curator 4.2
so i created two curator configuration file :
cat ~/curator_config.yml
# Remember, leave a key empty if there is no value. None will be a string, not a Python "NoneType"
client:
hosts:
- loclahost.com
port: 9200
timeout: 30 logging:
loglevel: INFO
cat ~/action_file_snapshot.yml
---
# Remember, leave a key empty if there is no value. None will be a string, not a Python "NoneType"
#
# Also remember that all examples have 'disable_action' set to True. If you want to use this action as a template, be sure to set
# this to False after copying it.
actions:
1:
action: snapshot
description: >-
Snapshot logstash- prefixed indices older than 30 day (based on index
creation_date) with the default snapshot name pattern of
'curator-%Y%m%d%H%M%S'. Wait for the snapshot to complete. Do not skip
the repository filesystem access check. Use the other options to create
the snapshot.
options:
repository:
# Leaving name blank will result in the default 'curator-%Y%m%d%H%M%S'
name: s3-backup
ignore_unavailable: False
include_global_state: True
partial: False
wait_for_completion: True
skip_repo_fs_check: False
timeout_override:
continue_if_exception: False
disable_action: True
filters:
- filtertype: pattern
kind: prefix
value: logstash-
exclude:
- filtertype: age
source: creation_date
direction: older
unit: days
unit_count: 30
exclude:
After this files creation, i execute this below command
curator --config ~/curator_config.yml ~/action_file_snapshot.yml Traceback (most recent call last):
File "/usr/bin/curator", line 9, in <module>
load_entry_point('elasticsearch-curator==4.2.6', 'console_scripts', 'curator')()
File "/usr/lib/python2.6/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python2.6/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/lib/python2.6/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python2.6/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/lib/python2.6/site-packages/curator/cli.py", line 115, in cli
client_args = process_config(config)
File "/usr/lib/python2.6/site-packages/curator/config_utils.py", line 46, in process_config
config = test_config(yaml_file)
File "/usr/lib/python2.6/site-packages/curator/config_utils.py", line 9, in test_config
yaml_config = get_yaml(config)
File "/usr/lib/python2.6/site-packages/curator/utils.py", line 56, in get_yaml
'Unable to parse YAML file. Error: {0}'.format(e))
curator.exceptions.ConfigurationError: Unable to parse YAML file. Error: mapping values are not allowed here
in "<string>", line 6, column 22:
timeout: 30 logging:
I am using curator 4.2 version and this commands execute in elasticsearch master node
$curator --version
curator, version 4.2.6
kindly help me this configuration are correct or not, if wrong kindly correct this configuration files.