Hello, I need to archive file in order to shrink size of index which older than 1 day, also delete index. Now my delete_indeces action works well, shrink action doesn`t. My index status is green now. What i should do?
Here is my file action_file.yml
actions:
1:
action: shrink
description: >-
Shrink indices older than 1 days
options:
allow_ilm_indices: True
disable_action: False
ignore_empty_list: False
continue_if_exception: False
shrink_node: DETERMINISTIC
node_filters:
permit_masters: False
exclude_nodes: ['not_this_node']
number_of_shards: 1
number_of_replicas: 1
shrink_prefix:
shrink_suffix: '-shrink'
delete_after: true
post_allocation:
allocation_type: include
key: node_tag
value: cold
wait_for_active_shards: 1
extra_settings:
settings:
index.codec: best_compression
wait_for_completion: True
wait_for_rebalance: True
wait_interval: 9
max_wait: -1
filters:
- filtertype: pattern
kind: prefix
value: mpayara-203-
- filtertype: age
source: name
direction: older
timestring: '%Y.%m.%d'
unit: days
unit_count: 1
And this is my logs
2020-02-20 06:42:15,858 DEBUG curator.indexlist empty_list_check:226 Checking for empty list
2020-02-20 06:42:15,858 DEBUG curator.utils get_date_regex:195 regex = \d{4}\.\d{2}\.\d{2}
2020-02-20 06:42:15,859 DEBUG curator.indexlist working_list:237 Generating working list of indices
2020-02-20 06:42:15,866 DEBUG curator.indexlist working_list:237 Generating working list of indices
2020-02-20 06:42:15,866 DEBUG curator.indexlist __actionable:35 Index mpayara-203-2020.02.16 is actionable and remains in the list.
2020-02-20 06:42:15,866 DEBUG curator.indexlist __excludify:58 Remains in actionable list: Index "mpayara-203-2020.02.16" age (1581811200), direction: "older", point of reference, (1582094535)
2020-02-20 06:42:15,866 DEBUG curator.indexlist iterate_filters:1238 Post-instance: ['mpayara-203-2020.02.16']
2020-02-20 06:42:15,866 DEBUG curator.actions.shrink _merge_extra_settings:1896 Adding extra_settings to shrink body: {'settings': {'index.codec': 'best_compression'}}
2020-02-20 06:42:15,866 DEBUG curator.cli process_action:99 Doing the action here.
2020-02-20 06:42:15,866 DEBUG curator.indexlist filter_closed:717 Filtering closed indices
2020-02-20 06:42:15,866 DEBUG curator.indexlist empty_list_check:226 Checking for empty list
2020-02-20 06:42:15,866 DEBUG curator.indexlist working_list:237 Generating working list of indices
2020-02-20 06:42:15,867 DEBUG curator.indexlist filter_closed:722 Index mpayara-203-2020.02.16 state: open
2020-02-20 06:42:15,867 DEBUG curator.indexlist __actionable:35 Index mpayara-203-2020.02.16 is actionable and remains in the list.
2020-02-20 06:42:15,867 DEBUG curator.indexlist filter_by_shards:1013 Filtering indices by number of shards
2020-02-20 06:42:15,867 DEBUG curator.indexlist empty_list_check:226 Checking for empty list
2020-02-20 06:42:15,867 DEBUG curator.indexlist working_list:237 Generating working list of indices
2020-02-20 06:42:15,867 DEBUG curator.indexlist filter_by_shards:1031 Filter by number of shards: Index: mpayara-203-2020.02.16
2020-02-20 06:42:15,867 DEBUG curator.indexlist __not_actionable:39 Index mpayara-203-2020.02.16 is not actionable, removing from list.
2020-02-20 06:42:15,867 DEBUG curator.indexlist empty_list_check:226 Checking for empty list
2020-02-20 06:42:15,867 ERROR curator.cli run:185 Unable to complete action "shrink". No actionable items in list: <class 'curator.exceptions.NoIndices'>
/usr/local/lib/python3.6/site-packages/curator/utils.py:53: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
return yaml.load(read_file(path))