# Where do we put logstash template?

**URL:** <https://discuss.elastic.co/t/where-do-we-put-logstash-template/39408>\
**Category:** Logstash\
**Created:** [January 17, 2016, 9:58pm UTC](https://discuss.elastic.co/t/where-do-we-put-logstash-template/39408 "2016-01-17T21:58:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MaxOrelus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maxorelus/32/6441_2.png) [@MaxOrelus](https://discuss.elastic.co/u/MaxOrelus)\
**Post date:** [January 17, 2016, 9:58pm UTC](https://discuss.elastic.co/t/where-do-we-put-logstash-template/39408/1 "2016-01-17T21:58:43Z")

</div>

I'm somewhat new to the ELK stack and I'm currently putting together my dev environment so I can get familiar with the different products. I already have gone through the process of setting up ElasticSearch, Logstash, and Kibana. I'm at the point where I want to define a template for logstash to read in Twitter documents.

There's a portion in the output block that you can set your template and template name. I'm wondering where exactly am I suppose to be putting my `template.json` file? From my understanding I always created a template via ElasticSearch, but this kinda throws me off as to what is really being asked here. Could someone explain this to me?

```
output {
  stdout { codec => dots }
  elasticsearch {
    hosts => "localhost:9200"
    index => "twitter"
    document_type => "tweet"
    template => "template.json"
    template_name => "twitter"
  }
}
```

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 18, 2016, 12:12am UTC](https://discuss.elastic.co/t/where-do-we-put-logstash-template/39408/2 "2016-01-18T00:12:43Z")

</div>

Where ever you want, just specify the full path and make sure it's readable.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [January 18, 2016, 3:51am UTC](https://discuss.elastic.co/t/where-do-we-put-logstash-template/39408/3 "2016-01-18T03:51:50Z")

</div>

You can still manage your template directly in Elasticsearch. Logstash offers to handle this in order to be able to load the default template and make it easier to get started with. For more complex deployments with multiple templates, it is probably easier to manage it directly in Elasticsearch.

---

<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:** [July 6, 2017, 5:15am UTC](https://discuss.elastic.co/t/where-do-we-put-logstash-template/39408/4 "2017-07-06T05:15:23Z")

</div>


