We have a custom wrapper on top of the standard elasticsearch and curator implementation at our company. I would like to know what would be the behavior of curator dealing with "Monthly/Weekly" indexes when the default "time-unit" is set to "days".
**I cannot override the default "time-unit"
Here is example format of how our monthly/weekly indexes are named
Format of Monthly Indexes
logstash-test-monthly-2018.01
logstash-test-monthly-2018.02
logstash-test-monthly-2018.03
logstash-test-monthly-2018.04
...
...
logstash-test-monthly-2018.12
Format of Weekly Indexes
logstash-test-weekly-2018.01
logstash-test-weekly-2018.02
...
...
...
logstash-test-weekly-2018.51
logstash-test-weekly-2018.52
Delete_Index.yml - Curator delete instructions
actions:
1:
action: delete_indices
options:
ignore_empty_list: true
filters:
- exclude: true
filtertype: kibana
- exclude: false
kind: regex
filtertype: pattern
value: .*-monthly-.*
- range_to: 0
filtertype: period
source: name
range_from: -60
period_type: relative
timestring: '%Y.%m.%d'
exclude: true
unit: days
description: Delete indices more than X days old
2:
action: delete_indices
options:
ignore_empty_list: true
filters:
- exclude: true
filtertype: kibana
- exclude: false
kind: regex
filtertype: pattern
value: .*-weekly-.*
- range_to: 0
filtertype: period
source: name
range_from: -30
period_type: relative
timestring: '%Y.%m.%d'
exclude: true
unit: days
Implementing the above config with the monthly index retention being 60 days and weekly index retention was 30 days.
The config was executed on **April,4th,2018 and the result was**
Monthly Indexes retained after execution
logstash-test-monthly-2018.03
logstash-test-monthly-2018.04
Since the above indexes ^^ only contain 31+4=35 days of index data and not 60 days worth as expected.
I was expecting curator will retain the following indexes
logstash-test-monthly-2018.02
logstash-test-monthly-2018.03
logstash-test-monthly-2018.04
Can anyone explain why curator is unable to retain 60days worth of indexes?