我目前正在观察以下错误。奇怪的是,它第一次起作用,后来我不得不为我的数据增加一个字段(Tag),这是我所做的唯一改变,现在我得到了映射错误。我无法弄清楚它背后的原因,现在当我删除我添加的字段时,我仍然会收到此错误。 ELK版本 - 6.2.3
[2018-03-23T06:15:30,271] [警告] [logstash.outputs.elasticsearch]可以 不是Elasticsearch的索引事件。 {:status => 400,:action => [“index”, {:_id => nil,:_index =>“healthccms-2018.03.23”,:_ type =>“doc”, :_routing => nil},#], :响应=> { “指数”=> { “_指数”=> “中healthccms-2018年3月23日”, “_type”=>“doc”,“_ id”=>“sffsf_HFKJ_sajfkjf6”,“status”=> 400, “error”=> {“type”=>“illegal_argument_exception”,“reason”=>“拒绝 将更新映射到[healthccms-2018.03.23]作为最终映射 有多种类型:[my_doc,doc]“}}}}
当我将我的映射名称更改为doc时,我收到以下错误。我看到与我得到的错误和模板没有任何关系。
[2018-03-23T06:46:57,483] [警告] [logstash.outputs.elasticsearch]可以 不是Elasticsearch的索引事件。 {:status => 400,:action => [“index”, {:_id => nil,:_index =>“healthccms-2018.03.23”,:_ type =>“doc”, :_routing => nil},#], :响应=> { “指数”=> { “_指数”=> “中healthccms-2018年3月23日”, “_type”=>“doc”,“_ id”=>“gjYcU2IB9pgc1BKZxkks”,“status”=> 400, “error”=> {“type”=>“mapper_parsing_exception”,“reason”=>“未能成功 解析“,”cause_by“=> {”type“=>”illegal_argument_exception“, “reason”=>“无法将[message.index]转换为布尔值”, “caused_by”=> {“type”=>“illegal_argument_exception”,“reason”=>“失败 将值[not_analyzed]解析为仅[true]或[false] 允许的。“}}}}}}
映射模板:
{
"template": "healthccms-*",
"settings": {
"index.refresh_interval": "10s"
},
"mappings": {
"my_doc": {
"dynamic_templates": [
{
"message_field": {
"path_match": "message",
"mapping": {
"type": "keyword",
"index": "not_analyzed",
"omit_norms": true
},
"match_mapping_type": "string"
}
},
{
"integers": {
"match_mapping_type": "long",
"mapping": {
"type": "integer"
}
}
},
{
"string_fields": {
"mapping": {
"type": "text",
"index": "analyzed",
"norms": false,
"fields": {
"keyword": {
"type": "keyword",
"index": "not_analyzed",
"ignore_above": 1024
}
}
},
"match_mapping_type": "string",
"match": "*"
}
}
],
"properties": {
"@timestamp": {
"format": "dateOptionalTime",
"type": "date"
},
"@version": {
"type": "keyword"
},
"host": {
"type": "keyword"
},
"path": {
"type": "keyword"
},
"ETime": {
"type": "date",
"format": "dateOptionalTime"
},
"OverAllStatus": {
"type": "integer"
},
"Env": {
"type": "keyword"
},
"HostAddress": {
"type": "keyword"
},
"ThresholdDiskSpace": {
"type": "keyword"
},
"Tag": {
"type": "integer"
}
}
}
}
}
我在文档中看到映射包含多个类型,我实际上并不明白这是什么意思。有人可以帮我理解模板中的问题,我该如何克服它。