# Unable to create elastic index through logstash output plugin with es index template in elastic DB

**URL:** <https://discuss.elastic.co/t/unable-to-create-elastic-index-through-logstash-output-plugin-with-es-index-template-in-elastic-db/139926>\
**Category:** Logstash\
**Created:** [July 13, 2018, 11:05am UTC](https://discuss.elastic.co/t/unable-to-create-elastic-index-through-logstash-output-plugin-with-es-index-template-in-elastic-db/139926 "2018-07-13T11:05:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thirumoorthi\_J](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thirumoorthi_j/32/33307_2.png) [@Thirumoorthi\_J](https://discuss.elastic.co/u/Thirumoorthi_J)\
**Post date:** [July 13, 2018, 11:05am UTC](https://discuss.elastic.co/t/unable-to-create-elastic-index-through-logstash-output-plugin-with-es-index-template-in-elastic-db/139926/1 "2018-07-13T11:05:42Z")

</div>

**Scenario 1:**  
The elastic index creation template is PUT into elastic DB first.  
The elastic index creation is attempted next with the mapping json as payload using PUT request.  
The elastic index is created successfully using elastic index template and the content of the index created is verified successfully.

**Scenario 2:**  
attempting to create elastic index in elastic DB (ver 6.2.3) using logstash output plugin ( ver 6.2.1).  
While attempting so, the "elastic index creation template" is being picked up as expected but the created index there upon has wrong content. This was verified using subsequent get request.

Scenario 1 creates elastic index with the right expected content(approximately 300 lines).  
But scenario 2 creates elastic index content which is 900 lines long and it is not desired.

First is it possible to create elastic index through logstash elastic search output plugin?  
If so, what am i missing overall?😩  
[RELATED POST in stack **overflow**](https://stackoverflow.com/questions/51323339/creating-of-elastic-indexes-using-logstash-elastic-output-plugin)

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [July 27, 2018, 4:07pm UTC](https://discuss.elastic.co/t/unable-to-create-elastic-index-through-logstash-output-plugin-with-es-index-template-in-elastic-db/139926/2 "2018-07-27T16:07:38Z")

</div>

> First is it possible to create elastic index through logstash Elasticsearch output plugin?

Yes.

What does your elasticsearch output plugin configuration look like? What's the name of the index you're creating? What does the index template look like?

---

<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:** [August 24, 2018, 4:07pm UTC](https://discuss.elastic.co/t/unable-to-create-elastic-index-through-logstash-output-plugin-with-es-index-template-in-elastic-db/139926/3 "2018-08-24T16:07:38Z")

</div>

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