# Linked indices shown 0 even after adding it to lifecycle

**URL:** <https://discuss.elastic.co/t/linked-indices-shown-0-even-after-adding-it-to-lifecycle/176706>\
**Category:** Elasticsearch\
**Created:** [April 12, 2019, 10:57pm UTC](https://discuss.elastic.co/t/linked-indices-shown-0-even-after-adding-it-to-lifecycle/176706 "2019-04-12T22:57:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![syedsfayaz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/syedsfayaz/32/46657_2.png) [@syedsfayaz](https://discuss.elastic.co/u/syedsfayaz)\
**Post date:** [April 12, 2019, 10:57pm UTC](https://discuss.elastic.co/t/linked-indices-shown-0-even-after-adding-it-to-lifecycle/176706/1 "2019-04-12T22:57:41Z")

</div>

Hi

I am usning Elastic search 6.7.

I have created policies in the lifecycle management index and added indices to it. But the status is shown 0. Any idea how can I see what inxdex is connected to which lifecycle policy and how I can add and delete an index.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/e/1e92f3f1d4c58a1de54533e9dd934202d9eb938b.png)

In actions I only see these two options. Do I need to upgrade ES and kibana for more features?

![image](https://us1.discourse-cdn.com/elastic/original/3X/6/a/6a47ba07aa14c8fb694c301f56cb509c297adb80.png)

---

<div class="post-metadata">

**Author:** ![dakrone](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dakrone/32/23351_2.png) [@dakrone](https://discuss.elastic.co/u/dakrone)\
**Post date:** [April 22, 2019, 3:25pm UTC](https://discuss.elastic.co/t/linked-indices-shown-0-even-after-adding-it-to-lifecycle/176706/2 "2019-04-22T15:25:37Z")

</div>

Hi Fayaz,

It looks like you've created a policy, but you don't have any indices that use that policy. There are 2 ways you can start using the policy.

The first is to create and index (or update its settings) with the `index.lifecycle.name` setting to be the policy that you created. Something like (to create a new index using a policy):

```auto
PUT /myindex
{
  "settings": {
    "index.lifecycle.name": "metricindex"
  }
}

```

The other would be to create an index template (this is what the "Add policy to index template" button will let you do) so that any new indices that are created that match a pattern will automatically start using your ILM policy.

---

<div class="post-metadata">

**Author:** ![syedsfayaz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/syedsfayaz/32/46657_2.png) [@syedsfayaz](https://discuss.elastic.co/u/syedsfayaz)\
**Post date:** [April 23, 2019, 10:28pm UTC](https://discuss.elastic.co/t/linked-indices-shown-0-even-after-adding-it-to-lifecycle/176706/3 "2019-04-23T22:28:59Z")

</div>

@dakrone This issue got resolved. But I see those indexes added to the lifecycle name but I see a different error now.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/e/e/ee62b0cc811652c96bbedd0c18306fd7be3ecfdf.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/0/40cbdb6ad2c7c66b6a0e77e49b89ebdb75b61b19.png)

---

<div class="post-metadata">

**Author:** ![dakrone](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dakrone/32/23351_2.png) [@dakrone](https://discuss.elastic.co/u/dakrone)\
**Post date:** [April 24, 2019, 4:36pm UTC](https://discuss.elastic.co/t/linked-indices-shown-0-even-after-adding-it-to-lifecycle/176706/4 "2019-04-24T16:36:40Z")

</div>

Okay, you can use the [ILM explain API](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ilm-explain-lifecycle.html) to see why those indices have errors in their ILM policies.

---

<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:** [May 22, 2019, 4:36pm UTC](https://discuss.elastic.co/t/linked-indices-shown-0-even-after-adding-it-to-lifecycle/176706/5 "2019-05-22T16:36:45Z")

</div>

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