# File template overriding not working

**URL:** https://discuss.elastic.co/t/file-template-overriding-not-working/66957
**Category:** Beats
**Tags:** filebeat
**Created:** [November 23, 2016, 8:45am UTC](https://discuss.elastic.co/t/file-template-overriding-not-working/66957 "2016-11-23T08:45:19Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![kozdincer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kozdincer/32/13364_2.png) [@kozdincer](https://discuss.elastic.co/u/kozdincer)
#### Post date: [November 23, 2016, 8:45am UTC](https://discuss.elastic.co/t/file-template-overriding-not-working/66957/1 "2016-11-23T08:45:19Z")

</div>

Hi,

I 've change default filebeat-template to make "message" property type as "object".  
But not shown as "object" in index. Shown as default "string".

Log says;  
"2016/11/21 15:43:30.532659 output.go:164: INFO Loading template enabled. Trying to load template: /etc/filebeat/filebeat.template.json  
2016/11/21 15:43:30.595836 output.go:172: INFO Existing template will be overwritten, as overwrite is enabled.  
2016/11/21 15:43:30.919118 client.go:266: INFO Elasticsearch template with name 'filebeat' loaded"

Any idea?

`# cat /etc/filebeat/filebeat.template.json`  
{  
"mappings": {  
"_default_": {  
"\_all": {  
"enabled": true,  
"norms": {  
"enabled": false  
}  
},  
"dynamic\_templates": [  
{  
"template1": {  
"mapping": {  
"doc\_values": true,  
"ignore\_above": 1024,  
"index": "not\_analyzed",  
"type": "{dynamic\_type}"  
},  
"match": "_"  
}  
}  
],  
"properties": {  
"@timestamp": {  
"type": "date"  
},  
"message": {  
"type": "object"  
},  
"offset": {  
"type": "long",  
"doc\_values": "true"  
}  
}  
}  
},  
"settings": {  
"index.refresh\_interval": "5s"  
},  
"template": "filebeat-_"  
}

`# cat /etc/filebeat/filebeat.yml | grep template: -A 10`  
template:

# Template name. By default the template name is filebeat.

name: "filebeat"

# Path to template file

path: "/etc/filebeat/filebeat.template.json"

# Overwrite existing template

overwrite: true

---

<div class="post-metadata">

### Author: ![kozdincer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kozdincer/32/13364_2.png) [@kozdincer](https://discuss.elastic.co/u/kozdincer)
#### Post date: [November 23, 2016, 9:15am UTC](https://discuss.elastic.co/t/file-template-overriding-not-working/66957/2 "2016-11-23T09:15:21Z")

</div>

I found the issue.  
in last line of template file, template propery value did not matching with my index name.  
thanks.

---

<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: [December 21, 2016, 9:15am UTC](https://discuss.elastic.co/t/file-template-overriding-not-working/66957/3 "2016-12-21T09:15:21Z")

</div>

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