FileBeatからIngest node Dissect Processorへの連携を行っております。
Input log
1286536308.779 180 192.168.0.224 TCP_MISS/200 411 GET http://liveupdate.symantecliveupdate.com/minitri.flg - DIRECT/125.23.216.203 text/plain
Dissect Processor
GET /_ingest/pipeline/squid_dissect
{
"squid_dissect" : {
"processors" : [
{
"dissect" : {
"field" : "message",
"pattern" : "%{timestamp->} %{duration} %{client_address} %{cache_result}/%{status_code} %{bytes} %{request_method} %{url} %{user} %{hierarchy_code}/%{server} %{content_type}"
}
}
]
}
}
Processorは以下にてインデックス登録できるかテスト済です。
POST /squid_dissect/log?pipeline=squid_dissect
{
"message": "1286536308.779 180 192.168.0.224 TCP_MISS/200 411 GET http://liveupdate.symantecliveupdate.com/minitri.flg - DIRECT/125.23.216.203 text/plain"
}
FBにてinputデータを連携すると、Elasticsearch側で以下のエラーが発生します。
フィールド「server」にてエラーが起こっているようですが、DEBUG logを見ると値が設定されています。
Elasticsearch log
[2019-09-26T15:32:58,111][DEBUG][o.e.a.b.TransportShardBulkAction] [filebeat-7.3.1-2019.09.12-000001][0] failed to execute bulk item (index) index {[filebeat-7.3.1][_doc][oJtFbG0BNykX-Og30Tv_], source[{"server":"125.23.216.203","agent":{"hostname":"XXXXXX","id":"XXXXXXX","type":"filebeat","ephemeral_id":"XXXXXXX","version":"7.3.1"},"status_code":"200","log":{"file":{"path":"/var/tmp/filebeat/access17.log"},"offset":0},"request_method":"GET","cloud":{"availability_zone":"XXX","instance":{"name":"XXXXXX","id":"i-0008e282"},"provider":"openstack","machine":{"type":"C-2"}},"duration":"180","ecs":{"version":"1.0.1"},"content_type":"text/plain","host":{"hostname":"XXXXXX","os":{"kernel":"3.10.0-957.27.2.el7.x86_64","codename":"Core","name":"CentOS Linux","family":"redhat","version":"7 (Core)","platform":"centos"},"containerized":false,"name":"XXXXXX","id":"df877a200226bc47d06f26dae0736ec9","architecture":"x86_64"},"cache_result":"TCP_MISS","client_address":"192.168.0.224","timestamp":"1286536308.779","hierarchy_code":"DIRECT","message":"1286536308.779 180 192.168.0.224 TCP_MISS/200 411 GET http://liveupdate.symantecliveupdate.com/minitri.flg - DIRECT/125.23.216.203 text/plain","url":"http://liveupdate.symantecliveupdate.com/minitri.flg","input":{"type":"log"},"@timestamp":"2019-09-26T06:32:59.198Z","bytes":"411","user":"-"}]}
org.elasticsearch.index.mapper.MapperParsingException: object mapping for [server] tried to parse field [server] as object, but found a concrete value
at org.elasticsearch.index.mapper.DocumentParser.parseObjectOrNested(DocumentParser.java:377) ~[elasticsearch-7.3.2.jar:7.3.2]
etc…
ご質問
上記エラーの原因が分かる方がいらっしゃいましたら教えてください。