# Unable to install template to Elasticsearch

**URL:** <https://discuss.elastic.co/t/unable-to-install-template-to-elasticsearch/50425>\
**Category:** Beats\
**Tags:** winlogbeat\
**Created:** [May 19, 2016, 11:06am UTC](https://discuss.elastic.co/t/unable-to-install-template-to-elasticsearch/50425 "2016-05-19T11:06:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dickepa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dickepa/32/8069_2.png) [@dickepa](https://discuss.elastic.co/u/dickepa)\
**Post date:** [May 19, 2016, 11:06am UTC](https://discuss.elastic.co/t/unable-to-install-template-to-elasticsearch/50425/1 "2016-05-19T11:06:18Z")

</div>

Hello

I have copied the 5 Alpha 2 template to my ELK stack and now trying to add it but when I do:

curl -XPUT [http://localhost:9200/\_template/winlogbeat](http://localhost:9200/_template/winlogbeat) -d winlogbeat.template.json in the same directory that holds the json file it fails with the following error:

> {"error":{"root\_cause":[{"type":"parse\_exception","reason":"Failed to derive xcontent"}],"type":"parse  
> \_exception","reason":"Failed to derive xcontent"},"status":400}

Any ideas?

---

<div class="post-metadata">

**Author:** ![Kevin\_Csuka](https://avatars.discourse-cdn.com/v4/letter/k/7feea3/32.png) [@Kevin\_Csuka](https://discuss.elastic.co/u/Kevin_Csuka)\
**Post date:** [May 19, 2016, 11:55am UTC](https://discuss.elastic.co/t/unable-to-install-template-to-elasticsearch/50425/2 "2016-05-19T11:55:17Z")

</div>

> [@dickepa](#):
>
> on","reason":"Failed to derive x

I think what you're trying to do is to put the winlogbeat.template.json in Elasticsearch.  
Is it possible for you to upload it from another source?

And change try to change localhost to the IP-adres, instead of localhost.

I also think that the CURL command you give isn't correct. (I'm not sure!)  
How I did it:

I downloaded the winlogbeat.template.json, and uploaded it in /Installs/  
I logged on to my Elasticsearch server, which has 192.168.43.51, and performed the following code:  
curl -XPUT [http://192.168.43.51:9200/\_template/winlogbeat](http://192.168.43.51:9200/_template/winlogbeat) -d@/installs/winlogbeat.template.json  
(Notice the '@')

What does your Elasticsearch log says?  
Did you try to restart Elasticsearch? And on what platform is your Elasticsearch currently running

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 19, 2016, 12:17pm UTC](https://discuss.elastic.co/t/unable-to-install-template-to-elasticsearch/50425/3 "2016-05-19T12:17:37Z")

</div>

`curl -XPUT http://localhost:9200/_template/winlogbeat -d @winlogbeat.template.json`

You forgot the `@`.

---

<div class="post-metadata">

**Author:** ![dickepa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dickepa/32/8069_2.png) [@dickepa](https://discuss.elastic.co/u/dickepa)\
**Post date:** [May 19, 2016, 12:30pm UTC](https://discuss.elastic.co/t/unable-to-install-template-to-elasticsearch/50425/4 "2016-05-19T12:30:07Z")

</div>

acknowledged

Thank you

---

<div class="post-metadata">

**Author:** ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)\
**Post date:** [May 23, 2016, 2:41pm UTC](https://discuss.elastic.co/t/unable-to-install-template-to-elasticsearch/50425/5 "2016-05-23T14:41:16Z")

</div>


