# Load index template from Filebeat module

**URL:** <https://discuss.elastic.co/t/load-index-template-from-filebeat-module/187780>\
**Category:** Beats\
**Created:** [June 27, 2019, 8:26am UTC](https://discuss.elastic.co/t/load-index-template-from-filebeat-module/187780 "2019-06-27T08:26:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jesusgn90](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jesusgn90/32/26998_2.png) [@jesusgn90](https://discuss.elastic.co/u/jesusgn90)\
**Post date:** [June 27, 2019, 8:26am UTC](https://discuss.elastic.co/t/load-index-template-from-filebeat-module/187780/1 "2019-06-27T08:26:18Z")

</div>

Hi guys!

I've made a Filebeat module and I have no problem with it, it's working. My question is about index templates for Elasticsearch, right now I have the next block in `/etc/filebeat/filebeat.yml` which is the main configuration file for Filebeat:

```auto
# Filebeat configuration file
filebeat.modules:
  - module: mymodule

setup.template.json.enabled: true
setup.template.json.path: '/etc/filebeat/my-template.json'
setup.template.json.name: 'my-template-name'
setup.template.overwrite: true

output.elasticsearch.hosts: ['http://YOUR_ELASTIC_SERVER_IP:9200']
#output.logstash.hosts: ["YOUR_LOGSTASH_SERVER_IP:5000"]

```

Can I move the `setup.template` block to some file of my module? I've been trying with some files with no result, it only works if I put it in the Filebeat main configuration, please help 😄

```auto
# I want this block in my module and not in the Filebeat config
setup.template.json.enabled: true
setup.template.json.path: '/etc/filebeat/my-template.json'
setup.template.json.name: 'my-template-name'
setup.template.overwrite: true

```

Thanks!

Best regards,  
Jesús

---

<div class="post-metadata">

**Author:** ![jesusgn90](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jesusgn90/32/26998_2.png) [@jesusgn90](https://discuss.elastic.co/u/jesusgn90)\
**Post date:** [June 28, 2019, 12:44pm UTC](https://discuss.elastic.co/t/load-index-template-from-filebeat-module/187780/2 "2019-06-28T12:44:12Z")

</div>

Any news team?

---

<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 26, 2019, 2:44pm UTC](https://discuss.elastic.co/t/load-index-template-from-filebeat-module/187780/3 "2019-07-26T14:44:16Z")

</div>

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