Hi,
I'm aware of this topic:
- Curator delete_indices. <type 'exceptions.KeyError'>: 'indices'
- Curator delete_indices
- Curator doesn't delete indices
I'm using ES 6.2.4 ans curator 5.5.4
My config.yml
is:
client:
hosts:
- es1.corp.net
- es2.corp.net
- es3.corp.net
port: 9200
timeout: 30
logging:
loglevel: DEBUG
actions.yml
actions:
1:
action: delete_indices
description: >-
Delete indices older than 30 days, metricbeat
options:
ignore_empty_list: True
disable_action: False
filters:
- filtertype: pattern
kind: prefix
value: metricbeat-
- filtertype: age
source: name
direction: older
timestring: '%Y.%m.%d'
unit: days
unit_count: 30
This curator config is running every day in a fesh docker container. It's not working since y upgrade from 6.2.3 to 6.2.4.
client = elasticsearch.Elasticsearch(hosts='es1.corp.net')
client.indices.stats(index='metricbeat-6.2.3-2018.05.24', metric='store,docs')
{'_shards': {'total': 2, 'successful': 2, 'failed': 0},
'_all': {'primaries': {'docs': {'count': 766735, 'deleted': 0},
'store': {'size_in_bytes': 281425602}},
'total': {'docs': {'count': 1533470, 'deleted': 0},
'store': {'size_in_bytes': 563361892}}},
'indices': {'metricbeat-6.2.3-2018.05.24': {'primaries': {'docs': {'count': 766735,
'deleted': 0},
'store': {'size_in_bytes': 281425602}},
'total': {'docs': {'count': 1533470, 'deleted': 0},
'store': {'size_in_bytes': 563361892}}}}}
and (partial) debug log:
2018-06-11 12:33:58,867 DEBUG curator.utils get_client:803 kwargs = {'url_prefix': '', 'aws_secret_key': None, 'http_auth': None, 'certificate': None, 'aws_key': None, 'aws_sign_request': False, 'port': 9200, 'hosts': ['es1.corp.net', 'es2.corp.net', 'es3.corp.net'], 'timeout': 30, 'aws_token': None, 'use_ssl': False, 'master_only': False, 'client_cert': None, 'ssl_no_validate': False, 'client_key': None}
2018-06-11 12:33:58,870 DEBUG curator.utils get_client:878 "requests_aws4auth" module present, but not used.
2018-06-11 12:33:58,879 DEBUG curator.utils check_version:689 Detected Elasticsearch version 6.2.4
2018-06-11 12:33:58,879 DEBUG curator.cli run:159 client is <class 'elasticsearch.client.Elasticsearch'>
2018-06-11 12:33:58,879 INFO curator.cli run:165 Trying Action ID: 1, "delete_indices": Delete indices older than 30 days, metricbeat
2018-06-11 12:33:58,879 DEBUG curator.cli process_action:44 Configuration dictionary: {'action': 'delete_indices', 'description': 'Delete indices older than 30 days, metricbeat', 'filters': [{'exclude': False, 'kind': 'prefix', 'filtertype': 'pattern', 'value': 'metricbeat-'}, {'direction': 'older', 'stats_result': 'min_value', 'filtertype': 'age', 'source': 'name', 'epoch': None, 'timestring': '%Y.%m.%d', 'exclude': False, 'unit_count': 30, 'unit': 'days'}], 'options': {}}
2018-06-11 12:33:58,880 DEBUG curator.cli process_action:45 kwargs: {'master_timeout': 30, 'dry_run': False}
2018-06-11 12:33:58,880 DEBUG curator.cli process_action:50 opts: {}
2018-06-11 12:33:58,880 DEBUG curator.cli process_action:62 Action kwargs: {'master_timeout': 30}
2018-06-11 12:33:58,880 DEBUG curator.cli process_action:91 Running "DELETE_INDICES"
2018-06-11 12:33:58,881 DEBUG curator.indexlist __get_indices:66 Getting all indices
2018-06-11 12:33:58,962 DEBUG curator.utils get_indices:644 Detected Elasticsearch version 6.2.4
2018-06-11 12:33:59,017 DEBUG curator.indexlist __build_index_info:81 Building preliminary index metadata for .monitoring-kibana-6-2018.01.21
2018-06-11 12:33:59,017 DEBUG curator.indexlist _get_metadata:175 Getting index metadata
2018-06-11 12:33:59,017 DEBUG curator.indexlist empty_list_check:224 Checking for empty list
2018-06-11 12:34:04,021 DEBUG curator.indexlist _get_index_stats:115 Getting index stats
2018-06-11 12:34:04,021 DEBUG curator.indexlist empty_list_check:224 Checking for empty list
2018-06-11 12:34:04,021 DEBUG curator.indexlist working_list:235 Generating working list of indices
2018-06-11 12:34:04,022 DEBUG curator.indexlist working_list:235 Generating working list of indices
2018-06-11 12:34:04,028 ERROR curator.cli run:184 Failed to complete action: delete_indices. <type 'exceptions.KeyError'>: 'indices'
Do you have an explanation ? In advance Thanks