Timing
editTiming
editThis functionality is in beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features.
Indices enter phases based on a phase’s min_age
parameter.
The index will not enter the phase until the index’s age is older than that
of the min_age
. The parameter is configured using a time
duration format (see Time Units).
min_age
defaults to zero seconds 0s
for each phase if not specified.
PUT _ilm/policy/my_policy { "policy": { "phases": { "warm": { "min_age": "1d", "actions": { "allocate": { "number_of_replicas": 1 } } }, "delete": { "min_age": "30d", "actions": { "delete": {} } } } } }
The Above example configures a policy that moves the index into the warm phase after one day. Until then, the index is in a waiting state. After moving into the warm phase, it will wait until 30 days have elapsed before moving to the delete phase and deleting the index.
min_age
is usually the time elapsed from the time the index is created. If the
index is rolled over, then min_age
is the time elapsed from the time the index
is rolled over. The intention here is to execute following phases and actions
relative to when data was written last to a rolled over index.
The previous phase’s actions must complete before index lifecycle management will check min_age
and transition into the next phase.