Timing
editTiming
editIndices 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, unless
the index.lifecycle.origination_date
index setting is configured, in which
case the min_age
will be the time elapsed since that specified date. 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. By default, index lifecycle management checks for indices that meet
policy criteria, like min_age
, every 10 minutes. You can use the
indices.lifecycle.poll_interval
cluster setting to control how often this
check occurs.