# Logstash template

**URL:** <https://discuss.elastic.co/t/logstash-template/351131>\
**Category:** Logstash\
**Created:** [January 16, 2024, 8:27am UTC](https://discuss.elastic.co/t/logstash-template/351131 "2024-01-16T08:27:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![SalehEska](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/saleheska/32/121805_2.png) [@SalehEska](https://discuss.elastic.co/u/SalehEska)\
**Post date:** [January 16, 2024, 8:27am UTC](https://discuss.elastic.co/t/logstash-template/351131/1 "2024-01-16T08:27:42Z")

</div>

The problem is it does not create template , the template just for change things in the settings.

this is the template :  
{  
"index\_patterns": ["audittrail\_transactions\_\*"],  
"settings": {  
"number\_of\_shards": 2,  
"index": {  
"max\_result\_window": 50000000,  
"mapping": {  
"total\_fields": {  
"limit": 100000  
}  
}  
}  
}  
}

and this is the config file :

output {  
elasticsearch {  
hosts =\> ["localhost:9200"]  
index =\> "audittrail\_transactions\_app-logs"  
ssl =\> false  
ssl\_certificate\_verification =\> false  
document\_id =\> "%{id}"  
template =\> "/C:/Users/s.nuseirat/Desktop/template.json"  
template\_name =\> "audittrail\_transactions\_"  
manage\_template =\> true  
}  
}`

---

<div class="post-metadata">

**Author:** ![yago82](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yago82/32/97755_2.png) [@yago82](https://discuss.elastic.co/u/yago82)\
**Post date:** [January 16, 2024, 9:07am UTC](https://discuss.elastic.co/t/logstash-template/351131/2 "2024-01-16T09:07:15Z")

</div>

Hi,

Verfity that the index name in your Logstash configuration match the index pattern in your template.

Regards

---

<div class="post-metadata">

**Author:** ![SalehEska](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/saleheska/32/121805_2.png) [@SalehEska](https://discuss.elastic.co/u/SalehEska)\
**Post date:** [January 16, 2024, 11:03am UTC](https://discuss.elastic.co/t/logstash-template/351131/3 "2024-01-16T11:03:01Z")

</div>

still can't create template

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [January 16, 2024, 11:57am UTC](https://discuss.elastic.co/t/logstash-template/351131/4 "2024-01-16T11:57:08Z")

</div>

What version are you using and what do you have in Logstash logs? You need to share your logs.

---

<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:** [February 13, 2024, 11:57am UTC](https://discuss.elastic.co/t/logstash-template/351131/5 "2024-02-13T11:57:48Z")

</div>

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