Hi All,
I was trying to setup curator for auto removal of my old indices but i am getting below error.
Please someone help me on this.
I have also attached screenshot of my curator and action file with it's output.
oot@prod-logstash:/usr/local/bin#
root@prod-logstash:/usr/local/bin# curator /usr/local/bin/delete-indices.yml --config /usr/local/bin/curator.yml --dry-run
2022-07-08 15:58:03,396 DEBUG curator.cli run:110 Client and logging options validated.
2022-07-08 15:58:03,396 DEBUG curator.cli run:114 default_timeout = 30
2022-07-08 15:58:03,396 DEBUG curator.cli run:118 action_file: /usr/local/bin/delete-indices.yml
2022-07-08 15:58:03,399 DEBUG curator.cli run:120 action_config: {'actions': {1: {'action': 'delete_indices', 'description': '\nDelete indices older than 180 days (based on index name), for logstash-\nprefixed indices. Ignore the error if the filter does not result in an\nactionable list of indices (ignore_empty_list) and If you want to change the retention Days then goto unit_count:180', 'options': {'ignore_empty_list': True, 'timeout_override': None, 'continue_if_exception': False, 'disable_action': False}, 'filters': [{'filtertype': 'age', 'source': 'name', 'direction': 'older', 'timestring': '%Y.%m.%d', 'unit': 'days', 'unit_count': 180}]}}}
2022-07-08 15:58:03,400 DEBUG curator.validators.SchemaCheck __init__:26 Schema: {'actions': <class 'dict'>}
2022-07-08 15:58:03,400 DEBUG curator.validators.SchemaCheck __init__:27 "Actions File" config: {'actions': {1: {'action': 'delete_indices', 'description': '\nDelete indices older than 180 days (based on index name), for logstash-\nprefixed indices. Ignore the error if the filter does not result in an\nactionable list of indices (ignore_empty_list) and If you want to change the retention Days then goto unit_count:180', 'options': {'ignore_empty_list': True, 'timeout_override': None, 'continue_if_exception': False, 'disable_action': False}, 'filters': [{'filtertype': 'age', 'source': 'name', 'direction': 'older', 'timestring': '%Y.%m.%d', 'unit': 'days', 'unit_count': 180}]}}}
2022-07-08 15:58:03,400 DEBUG curator.validators.SchemaCheck __init__:26 Schema: {'action': Any(In(['alias', 'allocation', 'close', 'cluster_routing', 'create_index', 'delete_indices', 'delete_snapshots', 'forcemerge', 'freeze', 'index_settings', 'open', 'reindex', 'replicas', 'restore', 'rollover', 'shrink', 'snapshot', 'unfreeze']), msg="action must be one of ['alias', 'allocation', 'close', 'cluster_routing', 'create_index', 'delete_indices', 'delete_snapshots', 'forcemerge', 'freeze', 'index_settings', 'open', 'reindex', 'replicas', 'restore', 'rollover', 'shrink', 'snapshot', 'unfreeze']")}
2022-07-08 15:58:03,400 DEBUG curator.validators.SchemaCheck __init__:27 "action type" config: {'action': 'delete_indices', 'description': '\nDelete indices older than 180 days (based on index name), for logstash-\nprefixed indices. Ignore the error if the filter does not result in an\nactionable list of indices (ignore_empty_list) and If you want to change the retention Days then goto unit_count:180', 'options': {'ignore_empty_list': True, 'timeout_override': None, 'continue_if_exception': False, 'disable_action': False}, 'filters': [{'filtertype': 'age', 'source': 'name', 'direction': 'older', 'timestring': '%Y.%m.%d', 'unit': 'days', 'unit_count': 180}]}
2022-07-08 15:58:03,401 DEBUG curator.validators.SchemaCheck __init__:26 Schema: {'action': Any(In(['alias', 'allocation', 'close', 'cluster_routing', 'create_index', 'delete_indices', 'delete_snapshots', 'forcemerge', 'freeze', 'index_settings', 'open', 'reindex', 'replicas', 'restore', 'rollover', 'shrink', 'snapshot', 'unfreeze']), msg="action must be one of ['alias', 'allocation', 'close', 'cluster_routing', 'create_index', 'delete_indices', 'delete_snapshots', 'forcemerge', 'freeze', 'index_settings', 'open', 'reindex', 'replicas', 'restore', 'rollover', 'shrink', 'snapshot', 'unfreeze']"), 'description': Any(<class 'str'>, <class 'str'>, msg=None), 'options': <class 'dict'>, 'filters': <class 'list'>}
2022-07-08 15:58:03,401 DEBUG curator.validators.SchemaCheck __init__:27 "structure" config: {'action': 'delete_indices', 'description': '\nDelete indices older than 180 days (based on index name), for logstash-\nprefixed indices. Ignore the error if the filter does not result in an\nactionable list of indices (ignore_empty_list) and If you want to change the retention Days then goto unit_count:180', 'options': {'ignore_empty_list': True, 'timeout_override': None, 'continue_if_exception': False, 'disable_action': False}, 'filters': [{'filtertype': 'age', 'source': 'name', 'direction': 'older', 'timestring': '%Y.%m.%d', 'unit': 'days', 'unit_count': 180}]}
2022-07-08 15:58:03,403 DEBUG curator.validators.SchemaCheck __init__:26 Schema: {'allow_ilm_indices': Any(<class 'bool'>, All(Any(<class 'str'>, msg=None), <function Boolean at 0x7f95d4043af0>, msg=None), msg=None), 'continue_if_exception': Any(<class 'bool'>, All(Any(<class 'str'>, msg=None), <function Boolean at 0x7f95d4043ca0>, msg=None), msg=None), 'disable_action': Any(<class 'bool'>, All(Any(<class 'str'>, msg=None), <function Boolean at 0x7f95d4043e50>, msg=None), msg=None), 'ignore_empty_list': Any(<class 'bool'>, All(Any(<class 'str'>, msg=None), <function Boolean at 0x7f95d4047040>, msg=None), msg=None), 'timeout_override': Any(Coerce(int, msg=None), None, msg=None)}
2022-07-08 15:58:03,403 DEBUG curator.validators.SchemaCheck __init__:27 "options" config: {'ignore_empty_list': True, 'continue_if_exception': False, 'disable_action': False}
2022-07-08 15:58:03,404 DEBUG curator.validators.SchemaCheck __init__:26 Schema: <function Filters.<locals>.f at 0x7f95d4043550>
2022-07-08 15:58:03,404 DEBUG curator.validators.SchemaCheck __init__:27 "filters" config: [{'filtertype': 'age', 'source': 'name', 'direction': 'older', 'timestring': '%Y.%m.%d', 'unit': 'days','unit_count': 180}]
2022-07-08 15:58:03,404 DEBUG curator.defaults.filtertypes age:55 AGE FILTER = [{'direction': Any('older', 'younger', msg=None)}, {'unit': Any('seconds', 'minutes', 'hours', 'days', 'weeks','months', 'years', msg=None)}, {'unit_count': Coerce(int, msg=None)}, {'unit_count_pattern': Any(<class 'str'>, msg=None)}, {'epoch': Any(Coerce(int, msg=None), None, msg=None)}, {'exclude': Any(<class 'bool'>, All(Any(<class 'str'>, msg=None), <function Boolean at 0x7f95d4047c10>, msg=None), msg=None)}, {'source': Any('name', 'creation_date', 'field_stats', msg=None)}, {'stats_result': Any('min_value', 'max_value', msg=None)},{'timestring': Any(<class 'str'>, msg=None)}]
2022-07-08 15:58:03,404 DEBUG curator.validators.SchemaCheck __init__:26 Schema: {'filtertype': Any(In(['age', 'alias', 'allocated', 'closed', 'count', 'empty', 'forcemerged', 'ilm', 'kibana', 'none', 'opened', 'pattern', 'period', 'shards', 'space', 'state']), msg="filtertype must be one of ['age', 'alias', 'allocated', 'closed', 'count', 'empty', 'forcemerged', 'ilm', 'kibana', 'none', 'opened', 'pattern','period', 'shards', 'space', 'state']"), 'direction': Any('older', 'younger', msg=None), 'unit': Any('seconds', 'minutes', 'hours', 'days', 'weeks', 'months', 'years', msg=None), 'unit_count': Coerce(int, msg=None),'unit_count_pattern': Any(<class 'str'>, msg=None), 'epoch': Any(Coerce(int, msg=None), None, msg=None), 'exclude': Any(<class 'bool'>, All(Any(<class 'str'>, msg=None), <function Boolean at 0x7f95d4047c10>, msg=None), msg=None), 'source': Any('name', 'creation_date', 'field_stats', msg=None), 'stats_result': Any('min_value', 'max_value', msg=None), 'timestring': Any(<class 'str'>, msg=None)}
2022-07-08 15:58:03,405 DEBUG curator.validators.SchemaCheck __init__:27 "filter" config: {'filtertype': 'age', 'source': 'name', 'direction': 'older', 'timestring': '%Y.%m.%d', 'unit': 'days', 'unit_count': 180}
2022-07-08 15:58:03,405 DEBUG curator.validators.filters f:48 Filter #0: {'filtertype': 'age', 'source': 'name', 'direction': 'older', 'timestring': '%Y.%m.%d', 'unit': 'days', 'unit_count': 180, 'epoch': None, 'stats_result': 'min_value', 'exclude': False}
2022-07-08 15:58:03,405 DEBUG curator.cli run:123 Full list of actions: {1: {'action': 'delete_indices', 'description': '\nDelete indices older than 180 days (based on index name),for logstash-\nprefixed indices. Ignore the error if the filter does not result in an\nactionable list of indices (ignore_empty_list) and If you want to change the retention Days then goto unit_count:180', 'options': {'ignore_empty_list': True, 'continue_if_exception': False, 'disable_action': False, 'timeout_override': None, 'allow_ilm_indices': False}, 'filters': [{'filtertype': 'age', 'source': 'name', 'direction': 'older', 'timestring': '%Y.%m.%d', 'unit': 'days', 'unit_count': 180, 'epoch': None, 'stats_result': 'min_value', 'exclude': False}]}}
2022-07-08 15:58:03,405 DEBUG curator.cli run:128 action_disabled = False
2022-07-08 15:58:03,405 DEBUG curator.cli run:131 continue_if_exception = False
2022-07-08 15:58:03,405 DEBUG curator.cli run:134 timeout_override = None
2022-07-08 15:58:03,405 DEBUG curator.cli run:136 ignore_empty_list = True
2022-07-08 15:58:03,405 DEBUG curator.cli run:138 allow_ilm_indices = False
2022-07-08 15:58:03,405 INFO curator.cli run:148 Preparing Action ID: 1, "delete_indices"
2022-07-08 15:58:03,405 INFO curator.cli run:162 Creating client object and testing connection
2022-07-08 15:58:03,405 DEBUG curator.utils get_client:809 kwargs = {'hosts': ['127.0.0.1'], 'port': 9200, 'use_ssl': False, 'ssl_no_validate': False, 'master_only': False, 'aws_token': None, 'aws_secret_key': None, 'certificate': None, 'client_cert': None, 'client_key': None, 'http_auth': None, 'aws_sign_request': False, 'url_prefix': '', 'aws_key': None, 'timeout': 30}
2022-07-08 15:58:03,405 DEBUG curator.utils get_client:871 Checking for AWS settings
2022-07-08 15:58:03,408 DEBUG curator.utils get_client:886 "requests_aws4auth" module present, but not used.
2022-07-08 15:58:03,408 INFO curator.utils get_client:903 Instantiating client object
2022-07-08 15:58:03,408 INFO curator.utils get_client:906 Testing client connectivity
2022-07-08 15:58:03,411 DEBUG urllib3.connectionpool _new_conn:204 Starting new HTTP connection (1): 127.0.0.1:9200
2022-07-08 15:58:03,413 DEBUG urllib3.connectionpool _new_conn:204 Starting new HTTP connection (2): 127.0.0.1:9200
2022-07-08 15:58:03,415 DEBUG urllib3.connectionpool _new_conn:204 Starting new HTTP connection (3): 127.0.0.1:9200
2022-07-08 15:58:03,416 DEBUG urllib3.connectionpool _new_conn:204 Starting new HTTP connection (4): 127.0.0.1:9200
2022-07-08 15:58:03,416 ERROR curator.utils get_client:915 HTTP N/A error: HTTPConnectionPool(host='127.0.0.1', port=9200): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f95d3fe70a0>: Failed to establish a new connection: [Errno 111] Connection refused'))
2022-07-08 15:58:03,416 CRITICAL curator.utils get_client:923 Curator cannot proceed. Exiting.
root@prod-logstash:/usr/local/bin#