ILM no longer manages new indices that use the deprecated metrics policy
After you upgrade, new backing indices of a time series data stream (TSDS) that still uses the deprecated metrics index lifecycle management (ILM) policy stop being managed by ILM.
The policy stays attached, but data stream lifecycle manages those new indices instead.
This applies only to the deprecated metrics and only when it has not been modified.
Use this page to confirm that is what happened and, if you want ILM to keep managing the indices, put them back under ILM.
- The deprecated
metricsILM policy is still attached to the data stream or its backing indices but the ILM explain API does not show ILM managing a new backing index. - The explain data stream lifecycle API shows data stream lifecycle managing that index, using either the minimum lifecycle or the configured one if defined.
- Older backing indices remain managed by ILM.
Elasticsearch defaults index.lifecycle.prefer_ilm to false on a new backing index only when all the following are true:
- The index is a backing index of a TSDS. Other data streams and standalone indices are not affected.
- The template resolves
index.lifecycle.nameto the deprecated policy namedmetrics. - That policy is still the pre-installed one: version 1,
managed: true, and a single hot phase whose only action is rollover at 50GB or 30 days. A custom policy, a modifiedmetricspolicy, or any later policy version stays under ILM. - Nothing in the index template, the data stream settings, or the create index request sets
index.lifecycle.prefer_ilm. An explicit value always takes precedence. - The
data_streams.lifecycle.prefer_by_default.metrics_enabledcluster setting istrue.
Existing backing indices stay under ILM. The switch happens the next time Elasticsearch creates a backing index, which is the next rollover after the upgrade. If the data stream already has its own data stream lifecycle, that lifecycle manages the new index. If it doesn't, the minimum lifecycle does.
The unmodified metrics policy only rolled the write index over.
It did not delete or downsample data, so those actions are unchanged.
The minimum data stream lifecycle takes over rollover and tail merging starts.
If you do not mind migrating from ILM to data stream lifecycle, you don't need to change anything.
To keep ILM managing the indices, select the option that matches the scope you need:
All new backing indices in the cluster: Set the dynamic cluster setting
data_streams.lifecycle.prefer_by_default.metrics_enabledtofalse:PUT _cluster/settings{ "persistent": { "data_streams.lifecycle.prefer_by_default.metrics_enabled": false } }NoteThis cluster setting doesn't change backing indices that already have
index.lifecycle.prefer_ilmset tofalse. To change those, refer to the third option.New backing indices of specific data streams: Set
index.lifecycle.prefer_ilmtotruein the component or index template.Existing backing indices of a data stream: Update the data stream settings. The following request changes
index.lifecycle.prefer_ilmon all backing indices of the data stream:PUT _data_stream/my-time-series/_settings{ "index.lifecycle.prefer_ilm": true }