# Import index template

**URL:** <https://discuss.elastic.co/t/import-index-template/133563>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [May 28, 2018, 2:37pm UTC](https://discuss.elastic.co/t/import-index-template/133563 "2018-05-28T14:37:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guido\_van\_Brakel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/guido_van_brakel/32/31673_2.png) [@Guido\_van\_Brakel](https://discuss.elastic.co/u/Guido_van_Brakel)\
**Post date:** [May 28, 2018, 2:37pm UTC](https://discuss.elastic.co/t/import-index-template/133563/1 "2018-05-28T14:37:43Z")

</div>

Hi,

I'm trying to import the filebeat index template on CentOS 7, but I'm getting this error:

curl -XPUT '[http://localhost:9200/\_template/filebeat?pretty](http://localhost:9200/_template/filebeat?pretty)' -d@filebeat-index-template.json  
{  
"error" : "Content-Type header [application/x-www-form-urlencoded] is not supported",  
"status" : 406  
}

I'm trying to setup kibana, logstash, elasticsearch and filebeat all on one server.Please help.

---

<div class="post-metadata">

**Author:** ![pierhugues](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pierhugues/32/48383_2.png) [@pierhugues](https://discuss.elastic.co/u/pierhugues)\
**Post date:** [May 28, 2018, 4:22pm UTC](https://discuss.elastic.co/t/import-index-template/133563/2 "2018-05-28T16:22:29Z")

</div>

Hello @Guido_van_Brakel, [Elasticsearch 6.0 is more strict on the received](https://www.elastic.co/blog/strict-content-type-checking-for-elasticsearch-rest-requests) content-type and will refuse anything not `application/json`.

Adding `-H'Content-Type: application/json'` to your CURL command should do the trick.

---

<div class="post-metadata">

**Author:** ![Guido\_van\_Brakel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/guido_van_brakel/32/31673_2.png) [@Guido\_van\_Brakel](https://discuss.elastic.co/u/Guido_van_Brakel)\
**Post date:** [May 29, 2018, 7:47am UTC](https://discuss.elastic.co/t/import-index-template/133563/3 "2018-05-29T07:47:27Z")

</div>

Thanks for your reply, but then I'm getting this error:  
{  
"error" : {  
"root\_cause" : [  
{  
"type" : "mapper\_parsing\_exception",  
"reason" : "No handler for type [string] declared on field [message]"  
}  
],  
"type" : "mapper\_parsing\_exception",  
"reason" : "Failed to parse mapping [_default_]: No handler for type [string] declared on field [message]",  
"caused\_by" : {  
"type" : "mapper\_parsing\_exception",  
"reason" : "No handler for type [string] declared on field [message]"  
}  
},  
"status" : 400  
}

---

<div class="post-metadata">

**Author:** ![pierhugues](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pierhugues/32/48383_2.png) [@pierhugues](https://discuss.elastic.co/u/pierhugues)\
**Post date:** [May 29, 2018, 1:11pm UTC](https://discuss.elastic.co/t/import-index-template/133563/4 "2018-05-29T13:11:07Z")

</div>

@Guido_van_Brakel let's take a step back, did you make any modifications to the template? Because Filebeat by default on startup will upload the template.

---

<div class="post-metadata">

**Author:** ![Guido\_van\_Brakel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/guido_van_brakel/32/31673_2.png) [@Guido\_van\_Brakel](https://discuss.elastic.co/u/Guido_van_Brakel)\
**Post date:** [May 29, 2018, 2:00pm UTC](https://discuss.elastic.co/t/import-index-template/133563/5 "2018-05-29T14:00:46Z")

</div>

Nope just the default one on github

---

<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:** [June 26, 2018, 2:00pm UTC](https://discuss.elastic.co/t/import-index-template/133563/6 "2018-06-26T14:00:46Z")

</div>

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