By using multiple actions, each with different prefix filters and age filters:
---
actions:
1:
action: delete_indices
...
filters:
- filtertype: pattern
kind: prefix
value: A-
- filtertype: pattern
kind: timestring
value: %Y.%m.%d
- filtertype: age
source: creation_date
direction: older
unit: days
unit_count: 14
2:
action: delete_indices
...
filters:
- filtertype: pattern
kind: regex
value: '^B-|^C-|^D-'
- filtertype: pattern
kind: timestring
value: %Y.%m.%d
- filtertype: age
source: creation_date
direction: older
unit: days
unit_count: 7
This is a hypothetical action file with two actions. The first would delete indices that start with A-
and contain a YEAR
.MONTH
.DAY
timestring, after they were determined to be older than 14 days (based on the index creation date). The second would delete any indices starting with B-
, C-
, or D-
, that also contain a YEAR
.MONTH
.DAY
timestring, after they were determined to be older than 7 days (based on the index creation date). No other configuration data is included here, so test thoroughly with the --dry-run
flag before actually running something against your production data.