Good afternoon,
I'm having problems with logstash when putting a template file to perform a mapping.
in my logstash .conf file, I put "output {
elasticsearch {
hosts => ['localhost: 9200']
index => 'jose_test_v14'
manage_template => true
template => '/etc/logstash/conf.d/v14.json'
template_name => 'jose_test_v14'
template_overwrite => true
}
stdout {}
}
and within V14, I have the structure of the:
{
"template": "jose_pruebe_v14",
"settings": {
"number_of_shards": 1,
"number_of_replicas": 0,
"index": {
"query": {"default_field": "@message"},
"store": {"compress": {"stored": true, "tv": true}}
}
},
"mapping": {
"_Doc": {
"_all": {"enabled": false},
"_source": {"compress": true},
"dynamic_templates": [
{
"string_template": {
"match": "*",
"mapping": {"type": "string", "index": "not_analyzed"},
"match_mapping_type": "string"
}
}
],
"properties": {
"location": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
but when I run:
Failed to install template. {: message => "Got response code '400' contacting Elasticsearch at URL 'http: // localhost: 9200 / _template / jose_pruebe_v14'",
I do not know what is wrong so that I do not get the template for the mapping, since the dates, I do not want them with the elastic format it sets by default but
"date_variable": {
"type": "date",
"format": "yyyy-MM-DD"
},
any guidance that can help me to find the problem?
I have been looking at some people who have had the same problem, but I have not found the solution so that this does not happen.
attentively
José