Open jkqjkq opened 4 years ago
With "tcp", there will be a problem, after removing it, use the default "udp", there is no problem
same problem with tls
resuscitating this issue for whomever come here searching for a solution to this very problem: thoroughly search for non-printable characters in your logs. In my case, docker container's emitting the logs, were prepending an ANSI color at the beginning of each line, followed by a date. so after a lot of trial and error i came up with my specific case:
- MULTILINE_MATCH=first
- MULTILINE_PATTERN=^(.\[2m)(\d{4}-\d{2}-\d{2})
.\[2m
is the "color" for my case, it could change for you.
try to capture the raw log from the original docker container to catch these hidden chars.
A more general regex to detect ANSI color is:
\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]
(also useful to remove them with a mutate => gsub to remove them in logstash)
Judging from the left side of the picture, these log messages are not sent together, sent line by line
configuration information