# Customising built-in ILM policies

**URL:** <https://discuss.elastic.co/t/customising-built-in-ilm-policies/314037>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [September 9, 2022, 8:03am UTC](https://discuss.elastic.co/t/customising-built-in-ilm-policies/314037 "2022-09-09T08:03:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![praveen\_raju](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/praveen_raju/32/81804_2.png) [@praveen\_raju](https://discuss.elastic.co/u/praveen_raju)\
**Post date:** [September 9, 2022, 8:03am UTC](https://discuss.elastic.co/t/customising-built-in-ilm-policies/314037/1 "2022-09-09T08:03:26Z")

</div>

Following are the ILM policies i see which are created by default/

- `logs`
- `metrics`
- `synthetics`

I would like to delete the data after 90 days from the above ILM policies, is it recommended to update the current ILM policies ?

Here is the code snipped of the current `metrics` ILM policy. Please help me to include the logic, to delete data after 90 days.

```auto
PUT _ilm/policy/metrics
{
  "policy": {
    "phases": {
      "hot": {
        "min_age": "0ms",
        "actions": {
          "rollover": {
            "max_age": "30d",
            "max_primary_shard_size": "50gb"
          }
        }
      }
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 7, 2022, 8:03am UTC](https://discuss.elastic.co/t/customising-built-in-ilm-policies/314037/2 "2022-10-07T08:03:47Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
