Hello.
I am streaming mdaemon logs using filebeat and using multiline.pattern to concatenate lines into one event. Using logstash, I create fields "mail from", "mail to", "message id", etc.
Is it possible to make grok understand the end of the line "\ n"?
\n should match the end of line assuming unix line ends ([\n\r]+) is more generic
Note you can put (?m) at the start of the grok to make . and \s match the new line this is way more efficient if you just want to match the whole thing rather than using \n as some sort of delimiter
Also note you can have multiple matches in a grok so you can do
match => {message => [
"(?-m)From: %{FROM:DATA}",
"(?-m}To: %{TO:DATA}",
]}
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.