# ILM Error- Added Delete phase

**URL:** <https://discuss.elastic.co/t/ilm-error-added-delete-phase/304769>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [May 16, 2022, 2:40am UTC](https://discuss.elastic.co/t/ilm-error-added-delete-phase/304769 "2022-05-16T02:40:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![VamPikmin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vampikmin/32/22367_2.png) [@VamPikmin](https://discuss.elastic.co/u/VamPikmin)\
**Post date:** [May 16, 2022, 2:40am UTC](https://discuss.elastic.co/t/ilm-error-added-delete-phase/304769/1 "2022-05-16T02:40:43Z")

</div>

Hello

I've updated my logstash policy to include the delete phase but I'm getting an error

```auto
curl -XGET localhost:9200/_ilm/policy/logstash-policy?pretty
{
  "logstash-policy" : {
    "version" : 5,
    "modified_date" : "2022-05-16T02:30:39.581Z",
    "policy" : {
      "phases" : {
        "hot" : {
          "min_age" : "0ms",
          "actions" : {
            "rollover" : {
              "max_size" : "50gb",
              "max_age" : "30d"
            }
          }
        },
        "delete" : {
          "min_age" : "365d",
          "actions" : {
            "delete" : {
              "delete_searchable_snapshot" : true
            }
          }
        }
      }
    },
    "in_use_by" : {
      "indices" : [
        "logstash-2019.12.27-000009",
        "logstash-2019.11.27-000008",
        "logstash-2019.10.28-000007",
        "logstash-2020.03.26-000012",
        "logstash-2021.12.16-000033",
        "logstash-2021.06.19-000027",
        "logstash-2019.07.30-000004",
        "logstash-2021.05.20-000026",
        "logstash-2022.01.15-000034",
        "logstash-2019.05.01-000001",
        "logstash-2019.08.29-000005",
        "logstash-2021.04.20-000025",
        "logstash-2019.09.28-000006",
        "logstash-2022.02.14-000035",
        "logstash-2019.06.30-000003",
        "logstash-2020.01.26-000010",
        "logstash-2020.02.25-000011",
        "logstash-2021.11.16-000032",
        "logstash-2021.08.18-000029",
        "logstash-2021.07.19-000028",
        "logstash-2021.10.17-000031",
        "logstash-2021.09.17-000030",
        "logstash-2019.05.31-000002"
      ],
      "data_streams" : [],
      "composable_templates" : []
    }
  }
}

```

This is the error

```auto
curl -XGET localhost:9200/logstash-*/_ilm/explain?pretty
{
  "indices" : {
    "logstash-2019.12.27-000009" : {
      "index" : "logstash-2019.12.27-000009",
      "managed" : true,
      "policy" : "logstash-policy",
      "index_creation_date_millis" : 1577422926867,
      "time_since_index_creation" : "870.9d",
      "lifecycle_date_millis" : 1580015268988,
      "age" : "840.89d",
      "phase" : "completed",
      "phase_time_millis" : 1580015269823,
      "action" : "completed",
      "action_time_millis" : 1580015269823,
      "step" : "completed",
      "step_time_millis" : 1580015269823,
      "step_info" : {
        "type" : "null_pointer_exception",
        "reason" : "Cannot invoke \"org.elasticsearch.xpack.core.ilm.Step.getKey()\" because the return value of \"org.elasticsearch.core.Tuple.v2()\" is null"
      },
      "phase_execution" : {
        "policy" : "logstash-policy",
        "version" : 1,
        "modified_date_in_millis" : 1556494872821
      }

```

---

<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:** [June 13, 2022, 2:41am UTC](https://discuss.elastic.co/t/ilm-error-added-delete-phase/304769/2 "2022-06-13T02:41:31Z")

</div>

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