Hi
I configured filebeat 6.2.1 like this:
filebeat.prospectors:
- type: docker
document_type: eoclog4j
paths:
- '/var/lib/docker/containers/*/*.log'
containers.ids:
- '*'
multiline:
pattern: '([0-9]{4}-[0-9]{2}-[0-9]{2})|(\[[0-9]{2}.[0-9]{2}.[0-9]{4})'
negate: true
match: after
fields_under_root: true
fields:
source_system: filebeat_docker
processors:
- add_docker_metadata: ~
Everything seems ok except that sometime multiline fails. It seems to me (I know this is strange but I cannot find other explanations) that this happens when lines ends with: ,\n
Example:
This went wrong (lines are divided):
{"log":"2018-03-01T14:34:21.032-0000 - ERROR - [server] - Error in blablblabla:
'2018-02-23 13:43:59.653165000 +0000',\n","stream":"stdout","time":"2018-03-01T14:34:21.145493486Z"}
{"log":" 'blablabla': '2018-02-23 13:43:59.465964600 +0000',\n","stream":"stdout","time":"2018-03-01T14:34:21
.14552074Z"}
This works OK (lines goes in same event):
{"log":" at blablabla\n","stream":"stdout","time":"2018-03-01T14:34:21.145679703Z"}
{"log":" at blablabla (events.js:126:13)\n","stream":"stdout","time":"2018-03-01T14:34:21.145683059Z"}
{"log":" at blablabla (events.js:214:7)\n","stream":"stdout","time":"2018-03-01T14:34:21.145686123Z"}
Any ideas?
Many thanks