# Problem running lifecycle policy on index template with alias

**URL:** <https://discuss.elastic.co/t/problem-running-lifecycle-policy-on-index-template-with-alias/207487>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [November 12, 2019, 10:21am UTC](https://discuss.elastic.co/t/problem-running-lifecycle-policy-on-index-template-with-alias/207487 "2019-11-12T10:21:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rufonon](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@rufonon](https://discuss.elastic.co/u/rufonon)\
**Post date:** [November 12, 2019, 10:21am UTC](https://discuss.elastic.co/t/problem-running-lifecycle-policy-on-index-template-with-alias/207487/1 "2019-11-12T10:21:07Z")

</div>

Good Morning,  
I am a developer that I am starting to assemble a basic cluster of elasticsearch and kibana.  
I have some doubts and I would like to know how to solve them.  
I have 3 machines that see each other in a cluster called "X". All of them with the version I use the elasticsearch-7.4.1 and kibana kibana-7.4.1.

Next, from kibana, I create an index template called “data-template” with "data-\*" pattern and "data" alias (I want my indexes to be called "data-0001", ...).  
I haven't created any index yet

Next I create the index life policy.  
Then I assign the policy to template (with "data" rollover alias).

At this point, is it necessary to create the first index called (for example) data-00001?

Then, could I start doing POST with the template alias?

I have a process that inserts random information every X seconds such that:

POST [http://localhost:9200/data/\_doc/?pretty](http://localhost:9200/data/_doc/?pretty)

Greetings and thank you very much

---

<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:** [December 10, 2019, 10:21am UTC](https://discuss.elastic.co/t/problem-running-lifecycle-policy-on-index-template-with-alias/207487/2 "2019-12-10T10:21:08Z")

</div>

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