# Configuration file: setup.template.pattern usage?

**URL:** <https://discuss.elastic.co/t/configuration-file-setup-template-pattern-usage/183322>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [May 29, 2019, 11:47am UTC](https://discuss.elastic.co/t/configuration-file-setup-template-pattern-usage/183322 "2019-05-29T11:47:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ORich](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/orich/32/21675_2.png) [@ORich](https://discuss.elastic.co/u/ORich)\
**Post date:** [May 29, 2019, 11:47am UTC](https://discuss.elastic.co/t/configuration-file-setup-template-pattern-usage/183322/1 "2019-05-29T11:47:25Z")

</div>

I am not clear in my mind regarding the option setup.template.pattern in FileBeat configuration file.  
From a general standpoint, I do not understand why we should tell Filebeat which index template to load ? According to index template definition, there is a field named index\_patterns which clearly states that index matching as an example pattern **filebeat-6.5.1-** \* are managed by template name **filebeat-6.5.1**

This said, what does setup.template.pattern option stands for ? Does it mean that any template which name does match setup.template.pattern should be applied to the filebeat index ?

All this stuff sounds redundant with template mechanism setup at elasticsearch node level.

Any comments highly appreciated.  
Thx

---

<div class="post-metadata">

**Author:** ![Askia\_Mohamed\_Kadri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/askia_mohamed_kadri/32/134665_2.png) [@Askia\_Mohamed\_Kadri](https://discuss.elastic.co/u/Askia_Mohamed_Kadri)\
**Post date:** [May 29, 2019, 12:03pm UTC](https://discuss.elastic.co/t/configuration-file-setup-template-pattern-usage/183322/2 "2019-05-29T12:03:09Z")

</div>

> This said, what does setup.template.pattern option stands for ? Does it mean that any template which name does match setup.template.pattern should be applied to the filebeat index ?

You have to set this parameter only if you want to have a customised template name and a customised template pattern as the default one is filebeat-version-....

> [@ORich](#):
>
> All this stuff sounds redundant with template mechanism setup at elasticsearch node level.

And by doing this you'll automatically load the template on Elasticsearch without having to set it directly from Kibana for example

---

<div class="post-metadata">

**Author:** ![ORich](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/orich/32/21675_2.png) [@ORich](https://discuss.elastic.co/u/ORich)\
**Post date:** [June 3, 2019, 12:13pm UTC](https://discuss.elastic.co/t/configuration-file-setup-template-pattern-usage/183322/3 "2019-06-03T12:13:05Z")

</div>

Thx Mohamed for your reply,  
from tests I performed, I can confirm that **setup.template.pattern** option from Filebeat configuration file does actually match the **index\_patterns** properties from index template output GET /\_template/template\_name

---

<div class="post-metadata">

**Author:** ![Askia\_Mohamed\_Kadri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/askia_mohamed_kadri/32/134665_2.png) [@Askia\_Mohamed\_Kadri](https://discuss.elastic.co/u/Askia_Mohamed_Kadri)\
**Post date:** [June 3, 2019, 12:27pm UTC](https://discuss.elastic.co/t/configuration-file-setup-template-pattern-usage/183322/4 "2019-06-03T12:27:06Z")

</div>

You're welcome mate

---

<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 1, 2019, 12:27pm UTC](https://discuss.elastic.co/t/configuration-file-setup-template-pattern-usage/183322/5 "2019-07-01T12:27:26Z")

</div>

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