---
title: Set the retention period for logging and metrics indices
description: Elastic Cloud Enterprise sets up default index lifecycle management (ILM) policies on the logging and metrics indices it collects. By default, metrics...
url: https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/4236/deploy-manage/monitor/orchestrators/ece-monitoring-ece-set-retention
products:
  - Elastic Cloud Enterprise
---

# Set the retention period for logging and metrics indices
Elastic Cloud Enterprise sets up default index lifecycle management (ILM) policies on the logging and metrics indices it collects. By default, metrics indices are kept for one day and logging indices are kept for seven days. This retention period can be adjusted.
You might need to adjust the retention period for one of the following reasons:
- If your business requires you to retain logs and metrics for longer than the default period.
- If the volume of logs and metrics collected is high enough to require reducing the amount of storage space consumed.

To customize the retention period, set up a custom lifecycle policy for logs and metrics indices:
1. [Create a new index lifecycle management (ILM) policy](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/4236/manage-data/lifecycle/index-lifecycle-management/configure-lifecycle-policy) in the logging and metrics cluster.
2. Create a new composable index template that matches the data view (formerly *index pattern*) for the data stream you want to customize the lifecycle for.
3. Specify a custom lifecycle policy in the index template settings.
4. Choose a higher `priority` for the template so the specified lifecycle policy will be used instead of the default.