Explain the lifecycle state
- GET /{index}/_ilm/explain
Get the current lifecycle status for one or more indices. For data streams, the API retrieves the current lifecycle status for the stream's backing indices.
The response indicates when the index entered each lifecycle state, provides the definition of the running phase, and information about any failures.
About explaining lifecycle stateRequired privileges
- Index privileges view_index_metadata manage_ilm
Query parameters
-
only_errorsboolean -
Filters the returned indices to only indices that are managed by ILM and are in an error state, either due to an encountering an error while executing the policy, or attempting to use a policy that does not exist.
-
expand_wildcardsunion oneOf · default: open -
Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as
open,hidden.Supported values include:
all: Match any data stream or index, including hidden ones.open: Match open, non-hidden indices. Also matches any non-hidden data stream.closed: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.hidden: Match hidden data streams and hidden indices. Must be combined withopen,closed, orboth.none: Wildcard expressions are not accepted.
-
Values:
allopenclosedhiddennone
Response
-
indicesmap string to oneOfrequired -
<string>union oneOf -
phase_executionobject -
phase_definitionobject -
actionsobject -
searchable_snapshotobject -
Phases allowed: hot, cold, frozen.
-
force_merge_on_cloneboolean · default: true -
If
true, and the index has replicas, ILM first clones the index with zero replicas and force merges the clone, so that replicas are not merged redundantly. Iffalse, the managed index is force merged directly. Not allowed whenforce_merge_indexisfalse. -
total_shards_per_nodenumber -
The maximum number of shards, including primaries and replicas, that can be allocated to any single node for the mounted index. Must be at least 1.
-
replicate_forunion oneOf -
The period for which the mounted index keeps one replica before the replica is removed. By default, the index is mounted without replicas. Must be positive. Only the first
searchable_snapshotaction in a policy may set this. It must fit before the next phase starts: for example, if this phase has amin_ageof 5d and the next phase has 12d, it can be at most 7d. -
Values:
-10
managed: true