Error when installing template "request body is required"

Hello,

Here is the error I get when I try to install Winlogbeat template into Elasticsearch :

curl -XPUT -H 'Content-Type: application/json' http://localhost:9200/_template/winlogbeat-6.1.0 -d@winlogbeat.template-6.1.0.json
Warning: Couldn't read data from file "winlogbeat.template-6.1.0.json", this
Warning: makes an empty POST.
{"error":{"root_cause":[{"type":"parse_exception","reason":"request body is required"}],"type":"parse_exception","reason":"request body is required"},"status":400}

Can you help me please ?

One more information, I exported the template from the powershell command

PS> .\winlogbeat.exe export template --es.version 6.1.0 | Out-File -Encoding UTF8 winlogbeat.template-6.1.0.json

That's a curl / windows issue.
Not related to elasticsearch.

Use the Kibana dev console. Much easier.

Or check curl help for windows.
Or check that your file actually exists and is readable and it's content.

Hello dadoonet,

Actualy my ELK stack is installed on Centos 7 and I use the command curl on it.

But I will defenitly start using the kibana dev console !
Thank You.

I just started using ELK, I'm not use to it yet !

And also, I wasn't in the right directory when executing the curl command, so the file was not here...

So sorry about that !

Thank you.

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