Hi I'm using multiline codec to concatenate lines into one event, here's an example of it:
# Time: 2022-08-29T07:43:30.314166Z
# User@Host: root[root] @ 1.1.1.1. [] Id: 111111
# Query_time: 0.019870 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0
SET timestamp=31554231;
set global slow_query_log_file="/logs/mysql-log";
# Time: 2022-08-29T12:34:30.419218Z
# User@Host: app[usr] @ [2.2.2.2] Id: 2222222
# Query_time: 0.000037 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0
use aaaaa;
SET timestamp=4141454;
SET autocommit=4;
this is my config:
input {
file {
path => "/home/user1/test.log"
start_position => "beginning"
sincedb_path => "/dev/null"
codec => multiline {
pattern => "^#%{SPACE}Time:%{SPACE}%{TIMESTAMP_ISO8601:time}"
negate => true
what => "previous"
}
}
}
Everything works, but the problem is that it does not read the second part of the log, namely everything that starts with
# Time: 2022-08-29T12:34:30.419218Z
however, if after "SET autocommit=4;" I add a similar timestamp "# Time: 2022-08-29....", then it will read everything up to "# Time: 2022-08-29....".
The question is how to make it read everything to the end?