Rollover and deleting indices using curator

Hi,
I want to rollover and delete indices which are older than 15days using curator 5.4.1

created two configuration files
cat curator.yml
client:
hosts:
- xxxxxxxxxxxxx
port: 9243
url_prefix:
use_ssl: true
certificate:
client_cert:
client_key:
ssl_no_validate: False
http_auth: 'xxxxx:xxxx'
timeout: 30
master_only: False

logging:
loglevel: INFO
logfile: /var/log/curator/curator.log
logformat: default
blacklist: ['elasticsearch', 'urllib3']

cat curator.yml

1:
action: rollover
description: Rollover the index "my_alias" when it is older than 15 days
options:
name: my_alias

max_docs: 2000000

max_age: 15d
disable_action: False
2:
action: delete_indices
description: >-
Delete indices older than 15 days (based on index name),for logstas
h-prefixed indices. Ignore the error if the filter does not result
in an actionable list of indices (ignore_empty_list) and exit clean
ly.
options:
ignore_empty_list: True
disable_action: False
filters:

  • filtertype: pattern
    kind: prefix
    value: logstash-,manageiq-,proofpoint-,azure-,
    iis-,adallom-,
  • filtertype: age
    source: name
    direction: older
    timestring: '%Y.%m.%d'
    unit: days
    unit_count: 15

I have executed this command below

/usr/bin# curator --dry-run --config /home/munna/.curator/curator.yml /home/munna/.curator/rollover.yml

the execution of the following command is as follows, throwing me these errrors

Traceback (most recent call last):
File "/usr/local/bin/curator", line 11, in
load_entry_point('elasticsearch-curator==5.4.1', 'console_scripts', 'curator')()
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/curator/cli.py", line 211, in cli
run(config, action_file, dry_run)
File "/usr/local/lib/python2.7/dist-packages/curator/cli.py", line 117, in run
action_config = get_yaml(action_file)
File "/usr/local/lib/python2.7/dist-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 "", line 29, column 10:
kind: prefix
^
kindly help me this configuration, if wrong kindly please help me in correction of this configuration files.

You must properly encapsulate your pasted YAML file within triple back ticks, or I cannot tell if the formatting (indentation, etc.) is correct. The error you pasted indicates a YAML configuration file error, but I cannot tell where it is because of the formatting.

```
PASTED CONTENT HERE
```

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