Curator cannot delete older indices

Hi all,

i would like to delete indices older X days. I found a lot of posts here but no one helped me.

My action file:

actions:
1:
action: delete_indices
description: >-
Delete indices older than 60 days (based on index name), for winlogbeat-
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
#timeout_override:
#continue_if_exception: False
disable_action: False
filters:
- filtertype: pattern
kind: prefix
value: metricbeat-
#exclude:
- filtertype: age
source: name
direction: older
timestring: '%Y.%m.%d'
unit: days
unit_count: 2
#exclude:

Problem is that it do not delete anything. I tryed to find something in debug. But dont know how to solve.

2019-10-28 15:41:41,459 DEBUG curator.indexlist __not_actionable:39 Index metricbeat-7.2.0-2019.10.26 is not actionable, removing from list.
2019-10-28 15:41:41,460 DEBUG curator.indexlist __excludify:58 Removed from actionable list: metricbeat-7.2.0-2019.10.26 has index.lifecycle.name metricbeat-7.2.0

How to manage it? I have it in my testing environment and really need to delete indices.

Thanks

Jan

Hi @Jan_Kaspar,

Could you uncomment timeout_override, continue_if_exception, the first exclude and change the value to metricbeat-7.2.0-* ?

Hi B.M

I tryed that but without any success.

Jan

Could you share your config file

This is expected behavior for this situation.

Particularly: has index.lifecycle.name metricbeat-7.2.0

This means the index is associated with an ILM policy. ILM is Elasticsearch's relatively new Index Lifecycle Management functionality. You ought to investigate using ILM to manage your indices, if you can.

If for some reason ILM does not meet your needs and/or you'd prefer to use Curator in conjunction with ILM, in order to prevent Curator from acting on any ILM associated index, it filters them by default. You can set the allow_ilm_indices option to true.

1 Like

Hi,

allow_ilm_indices: true solved my problem. Now indices are removed as I expected.
I have to delete indices because of storage space. I didnt know that ILM can delete indices.

Thanks,

Jan

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.