Customize data retention policies for integrations
These tutorials explain how to apply a custom ILM policy to an integration’s data stream.
For certain features you’ll need to use a slightly different procedure to manage the index lifecycle:
- APM: For versions 8.15 and later, refer to Index lifecycle management.
- Synthetic monitoring: Refer to Manage data retention.
- Universal Profiling: Refer to Universal Profiling index life cycle management.
How you apply an ILM policy depends on the data streams you want it to cover. Choose the approach that matches your use case.
Apply an ILM policy to all data streams across all namespaces: Edit the
logs@customormetrics@customcomponent template, so the policy covers every Fleetlogs-*ormetrics-*data stream. Repeat separately for logs and for metrics.Apply an ILM policy to specific data streams across all namespaces: Edit a data stream's own
@customcomponent template, leaving the integration's other data streams untouched.Apply an ILM policy to one data stream in one namespace: Clone the integration's index template and scope the copy to a single namespace. This is the heaviest option, because you take on maintaining the cloned template.
For shared settings across every data stream in a namespace, refer to Customize data streams with namespace index templates. Apply an ILM policy to all data streams in a custom integration: Create an <integration>@customcomponent template for an integration package you built yourself.
To apply an ILM policy to every data stream an integration produces in a single namespace, without editing templates yourself, refer to Apply an ILM policy to an integration namespace. This option requires namespace index templates.