Hi,
I would like delete all indices older than xxx days based on alias name (prefix+timestring) and not index name.
Is it possible ?
action: delete_indices >>> action: delete_indices_from_alias
ex:
alias > log-20170506
indexes > log-A1
indexes > log-B2
indexes > log-D1
name log-
timestring: '%Y%m%d'
unit: days
unit_count: xxx
Thx for help.
Best Regards
thn
(tri-man)
September 6, 2017, 1:31pm
2
I m not sure this page could be help me.
Because I would like use curator actions. It is for cron task to automatic delete old indexes.
Like this but regex on alias name doesn't work. Or How use timestring on Alias name.
actions:
1:
action: alias
description: >-
Alias indices
options:
name: log-?????????
warn_if_no_indices: True
ignore_empty_list: True
timeout_override:
continue_if_exception: False
disable_action: False
remove:
filters:
- filtertype: pattern
kind: regex
value: 'log.*'
- filtertype: age
source: name
direction: older
timestring: '%Y%m%d'
unit: days
unit_count: 1
exclude:
theuntergeek
(Aaron Mildenstein)
September 6, 2017, 3:06pm
4
Try Curator's alias filter . It will keep only indices associated with a named alias. However, it currently requires fully named aliases. You can't specify alias-%Y.%m.%d
to select aliases older than unit_count
unit
s.
I can not provide fully named aliases. Because it is exactly what I want to do.
Get indices from alias-%Y.%m.%d...
Same thing that "delete_indices" but from alias and not index name.
So, for now, I will use the elasticsearch java api with a custom program.
Waiting a new curator version with this function ^^.
Thx a lot.
theuntergeek
(Aaron Mildenstein)
September 6, 2017, 4:10pm
6
It won't happen without a feature request at GitHub - elastic/curator: Curator: Tending your Elasticsearch indices
Please go and add that feature there.
system
(system)
Closed
October 4, 2017, 4:10pm
7
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.