Curator Configuration / Errors

Hi,

Like many folks, my Elasticsearch indices are taking up quite a bit of disk space and I'm trying to use curator to delete/reduce disk usage. However, when I execute the command I get the following error and I'm a bit at a loss on how to decipher the errors. I've included the curator.yml and the action_file.yml in case I've messed those up. I appreciate any suggestions.

Hi,

Like many folks, my Elasticsearch indices are taking up quite a bit of disk space and I'm trying to use curator to delete/reduce disk usage. However, when I execute the command I get the following error. I've included the curator.yml and the action_file.yml in case I've messed those up. I appreicate any suggestions.

root@secon:/home/bgreen## cd /usr/local/bin
root@secon:/usr/local/bin# curator --config /usr/local/bin/curator.yml /usr/local/bin/action_file.yml
Traceback (most recent call last):
File "/usr/local/bin/curator", line 8, in <module>
sys.exit(cli())
File "/usr/lib/python3/dist-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python3/dist-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/lib/python3/dist-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3/dist-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/curator/cli.py", line 243, in cli
run(config, action_file, dry_run)
File "/usr/local/lib/python3.8/dist-packages/curator/cli.py", line 110, in run
client_args = process_config(config)
File "/usr/local/lib/python3.8/dist-packages/curator/config_utils.py", line 43, in process_config
config = test_config(yaml_file)
File "/usr/local/lib/python3.8/dist-packages/curator/config_utils.py", line 12, in test_config
yaml_config = get_yaml(config)
File "/usr/local/lib/python3.8/dist-packages/curator/utils.py", line 59, in get_yaml
return yaml.load(read_file(path), Loader=yaml.FullLoader)
File "/usr/local/lib/python3.8/dist-packages/yaml/__init__.py", line 114, in load
return loader.get_single_data()
File "/usr/local/lib/python3.8/dist-packages/yaml/constructor.py", line 49, in get_single_data
node = self.get_single_node()
File "/usr/local/lib/python3.8/dist-packages/yaml/composer.py", line 36, in get_single_node
document = self.compose_document()
File "/usr/local/lib/python3.8/dist-packages/yaml/composer.py", line 55, in compose_document
node = self.compose_node(None, None)
File "/usr/local/lib/python3.8/dist-packages/yaml/composer.py", line 84, in compose_node
node = self.compose_mapping_node(anchor)
File "/usr/local/lib/python3.8/dist-packages/yaml/composer.py", line 127, in compose_mapping_node
while not self.check_event(MappingEndEvent):
File "/usr/local/lib/python3.8/dist-packages/yaml/parser.py", line 98, in check_event
self.current_event = self.state()
File "/usr/local/lib/python3.8/dist-packages/yaml/parser.py", line 438, in parse_block_mapping_key
raise ParserError("while parsing a block mapping", self.marks[-1],
yaml.parser.ParserError: while parsing a block mapping
in "<unicode string>", line 4, column 1:
client:
^
expected <block end>, but found '<block mapping start>'
in "<unicode string>", line 7, column 2:
port: 9200
^
root@secon:/usr/local/bin#

curator.yml
---
#Remember, leave a key empty if there is no value. None will be a string,
#not a Python "NoneType"
client:
hosts:
- 127.0.0.1
port: 9200
url_prefix:
use_ssl: False
certificate:
client_cert:
client_key:
ssl_no_validate: False
username:
password:
http_auth:
timeout: 30
master_only: False

logging:
loglevel: INFO
logfile:
logformat: default
blacklist: ['elasticsearch', 'urllib3']

action_file.yml
actions:
1:
action: delete_indices
description: >-
Delete indices older than 30 days based on index name
options:
ignore_empty_list: True
disable_action: False
filters:
- filtertype: pattern
kind: regex
value: '^(metric|heart)beat-.*'
- filtertype: age
source: name
direction: older
timestring: '%Y.%m.%d'
unit: days
unit_count: '30'
EOF```

Your pasted code doesn't seem to have preserved indentation, so I can't tell what may be wrong. The error seems to indicate something incorrect with your YAML formatting, though.

Perhaps try to paste more cleanly?

```
Your pasted code here
```

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