# How can I configure the setup.template.pattern param for multiple indices in filebeat?

**URL:** <https://discuss.elastic.co/t/how-can-i-configure-the-setup-template-pattern-param-for-multiple-indices-in-filebeat/154790>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [October 31, 2018, 9:29am UTC](https://discuss.elastic.co/t/how-can-i-configure-the-setup-template-pattern-param-for-multiple-indices-in-filebeat/154790 "2018-10-31T09:29:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yongqiang](https://avatars.discourse-cdn.com/v4/letter/y/e274bd/32.png) [@yongqiang](https://discuss.elastic.co/u/yongqiang)\
**Post date:** [October 31, 2018, 9:29am UTC](https://discuss.elastic.co/t/how-can-i-configure-the-setup-template-pattern-param-for-multiple-indices-in-filebeat/154790/1 "2018-10-31T09:29:30Z")

</div>

hi,  
I configured the filebeat.yml with followings:  
filebeat.inputs:

- type: log  
enabled: true  
paths:

- type: log  
enabled: true  
paths:

- type: log  
enabled: true  
.....  
output.elasticsearch:  
hosts: ["IP:9200"]  
index: "%{[fields.service]}-%{+yyyy.MM.dd}"

I try to configure the setup.template.pattern as below:  
setup.template.name: "npos"  
setup.template.pattern: "dev-econtract-_","uat-econtract-_","dev-ekyc-_","uat-ekyc-_","dev-npos\*","uat-npos\*","dev-fim-_","uat-fim-_"

But unfortunately, it doesn't work.  
Could anyone tell me how to configure this param to include all the indices I have defined for this beat?

Thanks

---

<div class="post-metadata">

**Author:** ![Andrew\_Cholakian1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_cholakian1/32/3612_2.png) [@Andrew\_Cholakian1](https://discuss.elastic.co/u/Andrew_Cholakian1)\
**Post date:** [November 1, 2018, 5:31pm UTC](https://discuss.elastic.co/t/how-can-i-configure-the-setup-template-pattern-param-for-multiple-indices-in-filebeat/154790/2 "2018-11-01T17:31:06Z")

</div>

Have you also configured the `output.index` setting? If you change the template pattern you probably need to change that as well. You can find the docs here: [https://www.elastic.co/guide/en/beats/filebeat/current/elasticsearch-output.html](https://www.elastic.co/guide/en/beats/filebeat/current/elasticsearch-output.html)

---

<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 29, 2018, 5:31pm UTC](https://discuss.elastic.co/t/how-can-i-configure-the-setup-template-pattern-param-for-multiple-indices-in-filebeat/154790/3 "2018-11-29T17:31:21Z")

</div>

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