2019-03-20 16:56:57,662 INFO Preparing Action ID: 1, "delete_indices"
2019-03-20 16:56:57,668 INFO Trying Action ID: 1, "delete_indices"
2019-03-20 16:56:57,756 INFO DRY-RUN MODE. No changes will be made.
2019-03-20 16:56:57,756 INFO (CLOSED) indices may be shown that may not be acted on by action "delete_indices".
2019-03-20 16:56:57,756 INFO DRY-RUN: delete_indices: metricbeat-6.5.1-2019.03.19 with arguments: {}
2019-03-20 16:56:57,756 INFO DRY-RUN: delete_indices: metricbeat-6.5.1-2019.03.20 with arguments: {}
2019-03-20 16:56:57,756 INFO Action ID: 1, "delete_indices" completed.
2019-03-20 16:56:57,756 INFO Job completed.
Both shrink_metricbeat_indices.yml and delete_metricbeat_indices.yml have same filter section:
First, please encapsulate pasted log and config data between two sets of triple back-ticks, like this:
```
PASTE HERE
```
This improves readability for anyone trying to see what you have pasted.
Second, please run this again with debug level logging. It shows why filters behave the way they do, and what decisions it makes.
Technically speaking, the filter code is uniform. There is not separate or different filter code for any of the actions. However, shrink probably does some other things behind the scenes (I don't recall offhand, and I'm not able to look right now).
Thanks for your swift reply.
According to here enclosed log file snapshot, metricbeat indices are filtered out by the number of shards. But still don't understand why ? Here is the yaml file.
Thx for support. Regards. Richard
2019-03-20 18:00:39,708 DEBUG curator.indexlist working_list:237 Generating working list of indices
2019-03-20 18:00:39,708 DEBUG curator.indexlist filter_closed:722 Index metricbeat-6.5.1-2019.03.19 state: open
2019-03-20 18:00:39,708 DEBUG curator.indexlist __actionable:35 Index metricbeat-6.5.1-2019.03.19 is actionable and remains in the list.
2019-03-20 18:00:39,708 DEBUG curator.indexlist filter_closed:722 Index metricbeat-6.5.1-2019.03.20 state: open
2019-03-20 18:00:39,708 DEBUG curator.indexlist __actionable:35 Index metricbeat-6.5.1-2019.03.20 is actionable and remains in the list.
2019-03-20 18:00:39,708 DEBUG curator.indexlist filter_by_shards:1013 Filtering indices by number of shards
2019-03-20 18:00:39,709 DEBUG curator.indexlist empty_list_check:226 Checking for empty list
2019-03-20 18:00:39,709 DEBUG curator.indexlist working_list:237 Generating working list of indices
2019-03-20 18:00:39,709 DEBUG curator.indexlist filter_by_shards:1031 Filter by number of shards: Index: metricbeat-6.5.1-2019.03.19
2019-03-20 18:00:39,709 DEBUG curator.indexlist __not_actionable:39 Index metricbeat-6.5.1-2019.03.19 is not actionable, removing from list.
2019-03-20 18:00:39,709 DEBUG curator.indexlist filter_by_shards:1031 Filter by number of shards: Index: metricbeat-6.5.1-2019.03.20
2019-03-20 18:00:39,709 DEBUG curator.indexlist __not_actionable:39 Index metricbeat-6.5.1-2019.03.20 is not actionable, removing from list.
How can you shrink an index that already only has one primary shard? The shrink api is for reducing shard counts, so this index would be ineligible. That’s why Curator omitted it.
Update: Expanded answer.
You specified:
…in your YAML configuration. The shrink action in Curator reads this, and omits indices which already have that number of shards. This is why you experienced a different outcome between the two actions, even though they had identical filters. Curator is removing unnecessary actions for you (shrinking an index which is already at 1 primary shard).
Many thanks Aaron.
Your last answer is crystal clear. Since metricbeat indice size is huge - roughly 40 Gb - I had in mind to benefit from "shrink index.codec: best_compression" feature to reduce disk space usage ... even if metricbeat is mapped to a single primary shard.
Does it make sense to setup 2 primary shards per metricbeat indices in order to apply shrink to one primary shard with compression and then have a less disk usage at the end ?
Regards.
If 2 primary shards are unnecessary for your use case, then doing that just to achieve best compression is a bad use case for the shrink action in Curator.
You can achieve the same thing with a series of actions:
Close selected indices.
Change settings on the same indices.
Re-open the same indices.
Perform a force merge on those indices (this will trigger the actual compression of data).
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.