# Setting up Index Lifecycle Policies

**URL:** <https://discuss.elastic.co/t/setting-up-index-lifecycle-policies/251902>\
**Category:** Kibana\
**Created:** [October 13, 2020, 12:48pm UTC](https://discuss.elastic.co/t/setting-up-index-lifecycle-policies/251902 "2020-10-13T12:48:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gavin\_Clark](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gavin_clark/32/47826_2.png) [@Gavin\_Clark](https://discuss.elastic.co/u/Gavin_Clark)\
**Post date:** [October 13, 2020, 12:48pm UTC](https://discuss.elastic.co/t/setting-up-index-lifecycle-policies/251902/1 "2020-10-13T12:48:21Z")

</div>

We're currently working on setting up a more automated way of keeping our indices and shard count low and saw 'Index Lifecycle Policies' in Kibana which seems very powerful and easy to setup. We've created a policy, but how do we actually apply it to the existing indices? When I go to apply the created policy against our indices, the templates I see only seem to be the system generated templates and I don't see what I think should be a template for our actual logs.

Is there a way to see what template an index is using? None of the existing templates sound correct for what I think the template should be but I'm unsure. The screenshot attached shows the existing templates, but I'm unsure what, if any of these is actually the correct template.

Thank you in advance!

 ![Screen Shot 2020-10-13 at 7.45.42 AM](https://us1.discourse-cdn.com/elastic/original/3X/9/5/9573dbe9a1040f97d4486864acbd2822c1355284.png)

---

<div class="post-metadata">

**Author:** ![markov00](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markov00/32/33316_2.png) [@markov00](https://discuss.elastic.co/u/markov00)\
**Post date:** [October 14, 2020, 11:22am UTC](https://discuss.elastic.co/t/setting-up-index-lifecycle-policies/251902/2 "2020-10-14T11:22:09Z")

</div>

Hi, you can get the associated index template for your data calling the following API  
`GET _index_template`  
This will give you a fill list of all your templates which reports the associated indices patterns [https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-template.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-template.html)

---

<div class="post-metadata">

**Author:** ![Gavin\_Clark](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gavin_clark/32/47826_2.png) [@Gavin\_Clark](https://discuss.elastic.co/u/Gavin_Clark)\
**Post date:** [October 14, 2020, 3:40pm UTC](https://discuss.elastic.co/t/setting-up-index-lifecycle-policies/251902/3 "2020-10-14T15:40:50Z")

</div>

D'oh! I was looking at the template API but overlooked this. This gave me the information I needed, thank you markov00!

---

<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:** [November 11, 2020, 3:41pm UTC](https://discuss.elastic.co/t/setting-up-index-lifecycle-policies/251902/4 "2020-11-11T15:41:19Z")

</div>

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