# Retention of -ds.monitoring\*

**URL:** https://discuss.elastic.co/t/retention-of-ds-monitoring/349277
**Category:** Elasticsearch
**Tags:** elastic-stack-monitoring
**Created:** [December 13, 2023, 3:02pm UTC](https://discuss.elastic.co/t/retention-of-ds-monitoring/349277 "2023-12-13T15:02:52Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![SteffiAutumn](https://avatars.discourse-cdn.com/v4/letter/s/ad7895/32.png) [@SteffiAutumn](https://discuss.elastic.co/u/SteffiAutumn)
#### Post date: [December 13, 2023, 3:02pm UTC](https://discuss.elastic.co/t/retention-of-ds-monitoring/349277/1 "2023-12-13T15:02:52Z")

</div>

Unfortunately our indices created by Metricbeat 8 are not cleaned up, although the policy looks ok. Looking at the responsible policy I'd expect the indices to be deleted after 6 days, but they're not and we need to cleanup manually. Anything missing?

```json
{
  ".monitoring-8-ilm-policy": {
    "policy": {
      "phases": {
        "hot": {
          "actions": {
            "rollover": {
              "max_age": "3d",
              "max_primary_shard_size": "50gb"
            }
          },
          "min_age": "0ms"
        },
        "warm": {
          "actions": {
            "forcemerge": {
              "max_num_segments": 1
            }
          },
          "min_age": "0ms"
        },
        "delete": {
          "actions": {
            "delete": {
              "delete_searchable_snapshot": true
            }
          },
          "min_age": "3d"
        }
      },
      "_meta": {
        "description": "Index lifecycle policy generated for [monitoring-*-8] data streams",
        "defaults": {
          "delete_min_age": "Using value of [3d] based on the value of the [xpack.monitoring.history.duration] setting at node startup"
        }
      }
    },

```

Using Azure Elastic Cloud 8.5.3.

---

<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: [January 10, 2024, 3:03pm UTC](https://discuss.elastic.co/t/retention-of-ds-monitoring/349277/2 "2024-01-10T15:03:22Z")

</div>

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