I had similar issue when upgrading to 4.0. One thing you should do is omit all the empty lines on config file or comment them with hash (pound sign). They will load as empty strings.
I just created in my user home directory a config and action file like so:
curator_config.yml
---
# Remember, leave a key empty if there is no value. None will be a string,
# not a Python "NoneType"
client:
hosts:
- search1
port: 9200
timeout: 30
logging:
loglevel: INFO
curator_action.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: delete_indices
description: >-
Delete indices older than 5 days (based on index name), for custom-
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
continue_if_exception: False
disable_action: False
filters:
- filtertype: age
source: name
direction: older
timestring: '%Y.%m.%d'
unit: days
unit_count: 5
Then run curator, passing in the config files' paths and view output as so (I was deleting any indices with timestamp suffices older than 5 days):
curator --config ~/curator_config.yml ~/curator_action.yml
2016-09-26 14:33:20,862 INFO Preparing Action ID: 1, "delete_indices"
2016-09-26 14:33:20,870 INFO Trying Action ID: 1, "delete_indices": Delete indices older than 5 days (based on index name), for custom- prefixed indices. Ignore the error if the filter does not result in an actionable list of indices (ignore_empty_list) and exit cleanly.
2016-09-26 14:33:21,592 INFO Deleting selected indices: [u'topbeat-2016.09.17', u'topbeat-2016.09.16', u'topbeat-2016.09.15', u'topbeat-2016.09.14', u'feedbeat-2016.09.20', u'feedbeat-2016.09.21', u'topbeat-2016.09.19', u'topbeat-2016.09.18', u'feedbeat-2016.09.06', u'feedbeat-2016.09.07', u'feedbeat-2016.09.08', u'feedbeat-2016.09.09', u'feedbeat-2016.09.19', u'filebeat-2016.09.20', u'filebeat-2016.09.21', u'packetbeat-2016.09.19', u'packetbeat-2016.09.18', u'packetbeat-2016.09.12', u'packetbeat-2016.09.13', u'packetbeat-2016.09.14', u'packetbeat-2016.09.11', u'packetbeat-2016.09.17', u'packetbeat-2016.09.16', u'packetbeat-2016.09.15', u'packetbeat-2016.09.21', u'packetbeat-2016.09.08', u'packetbeat-2016.09.09', u'feedbeat-2016.09.11', u'feedbeat-2016.09.10', u'feedbeat-2016.09.13', u'feedbeat-2016.09.12', u'feedbeat-2016.09.15', u'feedbeat-2016.09.14', u'feedbeat-2016.09.17', u'feedbeat-2016.09.16', u'feedbeat-2016.09.18', u'filebeat-2016.09.17', u'filebeat-2016.09.16', u'filebeat-2016.09.15', u'filebeat-2016.09.14', u'filebeat-2016.09.19', u'filebeat-2016.09.18', u'packetbeat-2016.09.20', u'topbeat-2016.09.20', u'topbeat-2016.09.21']
2016-09-26 14:33:21,592 INFO ---deleting index feedbeat-2016.09.20
2016-09-26 14:33:21,593 INFO ---deleting index feedbeat-2016.09.21
2016-09-26 14:33:21,593 INFO ---deleting index topbeat-2016.09.19
2016-09-26 14:33:21,593 INFO ---deleting index topbeat-2016.09.18
2016-09-26 14:33:21,593 INFO ---deleting index feedbeat-2016.09.19
2016-09-26 14:33:21,593 INFO ---deleting index filebeat-2016.09.20
2016-09-26 14:33:21,593 INFO ---deleting index filebeat-2016.09.21
2016-09-26 14:33:21,594 INFO ---deleting index packetbeat-2016.09.19
2016-09-26 14:33:21,594 INFO ---deleting index packetbeat-2016.09.21
2016-09-26 14:33:21,596 INFO ---deleting index filebeat-2016.09.19
2016-09-26 14:33:21,596 INFO ---deleting index packetbeat-2016.09.20
2016-09-26 14:33:21,596 INFO ---deleting index topbeat-2016.09.20
2016-09-26 14:33:21,597 INFO ---deleting index topbeat-2016.09.21
2016-09-26 14:33:30,677 INFO Action ID: 1, "delete_indices" completed.
2016-09-26 14:33:30,677 INFO Job completed.
I hope this is helpful. FYI, my old command in pre 4.0 versions was the following:
#! /bin/bash
/usr/local/bin/curator --host search1 delete indices --older-than 5 --time-unit days --timestring '%Y.%m.%d'