Got the classic issue with a 6.8.3 cluster, I defined an index template and created it with ?include_type_name=false
{
"index_patterns": [ "esxi_firewall-*" ],
"mappings": {
"properties": {
"@timestamp": {
"type": "date"
},
"fw": {
"properties": {
"ttl" : { "type": "long" },
"len" : { "type": "long" },
"id" : { "type": "long" },
"urgp" : { "type": "long" },
"window" : { "type": "long" },
"tos" : { "type": "keyword" },
"res" : { "type": "keyword" },
"prec" : { "type": "keyword" },
"proto" : { "type": "keyword" },
"mark" : { "type": "keyword" },
"out" : { "type": "keyword" }
}
},
"ecs": {
"properties": {
"version": {
"type": "keyword"
}
}
},
"message": {
"type": "text",
"fields": {
"keyword": { "type" : "keyword" }
}
},
"host": {
"properties": {
"name": {
"type": "keyword"
}
}
},
"destination": {
"properties": {
"address": {
"type": "keyword",
"fields": {
"text": { "type" : "text" }
}
},
"ip": {
"type": "ip"
},
"port": {
"type": "long"
}
}
},
"source": {
"properties": {
"address": {
"type": "keyword",
"fields": {
"text": { "type" : "text" }
}
},
"ip": {
"type": "ip"
},
"port": {
"type": "long"
}
}
}
}
}
}
but when logstash attempt to index documents I get the conflicting document type:
[2019-09-23T21:59:42,025][WARN ][logstash.outputs.elasticsearch] Could not index
sponse=>{"index"=>{"_index"=>"esxi_firewall-2019.09.23", "_type"=>"doc", "_id"=>...
would have more than 1 type: [_doc, doc]"}}}}
output plugin configured without any document_type:
elasticsearch {
#cluster => 'mxes2data'
id => 'mxes2data'
index => '%{[@metadata][esindex]}-%{+YYYY.MM.dd}'
action => 'index'
codec => 'plain'
user => '<redacted>'
password => '<redacted>'
sniffing => false
manage_template => false
template_overwrite => true
hosts => ['<redacted>:9200','<redacted>:9200','<redacted>:9200']
}
}
wondering from where the 'doc' value comes?
Also attempting to map as much as possible to ECS 1.1, only not sure if the core field: ecs.version is just a dotted name or true nested and what nested field prefix to hide custom field under.
Any hints appreciated!