unifiedbeat icon indicating copy to clipboard operation
unifiedbeat copied to clipboard

Unable to load unifiedbeat.template.json

Open kravietz opened this issue 6 years ago • 1 comments

Per original instructions in README:

$ curl -XPUT 'http://localhost:9200/_template/unifiedbeat' [email protected]
{"error":"Content-Type header [application/x-www-form-urlencoded] is not supported","status":406}

Trying to force JSON:

$ curl -XPUT 'http://localhost:9200/_template/unifiedbeat' --data "$(cat unifiedbeat.template.json)"
-H Content-Type:application/json
{"error":{"root_cause":[{"type":"parse_exception","reason":"Failed to parse content to map"}],
"type":"parse_exception","reason":"Failed to parse content to map",
"caused_by":{"type":"json_parse_exception","reason":"Duplicate field 'input_type'\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@662adc31; line: 231, column: 21]"}},"status":400}

That's with ElasticSearch 6.5.4 on Ubuntu 18.

kravietz avatar Jan 20 '19 13:01 kravietz

Seems to be caused by this backwards-incompatible change in ElasticSearch - Removal of mapping types. Essentially, the whole template is no longer compatible with ES6+.

kravietz avatar Jan 20 '19 15:01 kravietz