Don't run curator (curator.exceptions.ConfigurationError: Unable to parse YAML file. Error)

Hello.

action.yml:
---
actions:
1:
action: delete_indices
description: >-
Delete indices older than {{ elk.elasticsearch.age_of_index }} days (based on index name)
options:
ignore_empty_list: True
disable_action: False
filters:
- filtertype: pattern
kind: prefix
value: {{ elk.logstash.index }}-*
- filtertype: age
source: name
direction: older
timestring: '%Y.%m.%d'
unit: days
unit_count: {{ elk.elasticsearch.age_of_index }}
2:
action: delete_indices
description: >-
Delete indices more than N Gb
options:
ignore_empty_list: True
disable_action: False
filters:
- filtertype: pattern
kind: prefix
value: {{ elk.logstash.index }}-*
- filtertype: space
disk_space: {{ elk.curator.size }}
use_age: True
source: creation_date
timestring:
field:
stats_result:
exclude:

curator.yml:
---
client:
hosts:
- elasticsearch
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:

Don't run docker container with curator. What is the problem? How to fix the error?


Configuration 1 in file action.yml is working. When configuration 2 is added, then the error is:
Docker logs curator:
...
{"log":" File "/usr/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke\n","stream":"stderr","time":"2017-09-14T07:56:52.732340712Z"}
{"log":" return callback(*args, **kwargs)\n","stream":"stderr","time":"2017-09-14T07:56:52.732495754Z"}
{"log":" File "/usr/local/lib/python2.7/site-packages/curator/cli.py", line 126, in cli\n","stream":"stderr","time":"2017-09-14T07:56:52.73250445Z"}
{"log":" action_config = get_yaml(action_file)\n","stream":"stderr","time":"2017-09-14T07:56:52.732507669Z"}
{"log":" File "/usr/local/lib/python2.7/site-packages/curator/utils.py", line 56, in get_yaml\n","stream":"stderr","time":"2017-09-14T07:56:52.73251033Z"}
{"log":" 'Unable to parse YAML file. Error: {0}'.format(e))\n","stream":"stderr","time":"2017-09-14T07:56:52.732513204Z"}
{"log":"curator.exceptions.ConfigurationError: Unable to parse YAML file. Error: while scanning for the next token\n","stream":"stderr","time":"2017-09-14T07:56:52.732576271Z"}
{"log":"found character '\t' that cannot start any token\n","stream":"stderr","time":"2017-09-14T07:56:52.7325886Z"}
{"log":" in "\u003cstring\u003e", line 24, column 1:\n","stream":"stderr","time":"2017-09-14T07:56:52.732591507Z"}
{"log":" \u0009options:\n","stream":"stderr","time":"2017-09-14T07:56:52.732594561Z"}
{"log":" ^\n","stream":"stderr","time":"2017-09-14T07:56:52.73259723Z"}

The error was eliminated. The problem was in tabulation in the action.yml

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