Would just like to ask how can Logstash handle multiline from input Filebeat.
My filebeat already handles the multiline however the logstash still outputs only the first line. after the \n all the rest are ignored already.
I tried to put the below filter but still not working.
Hoffmann
Monsieur Spalanzani n'aime pas la musique.
That's what she said!
Monsieur Spalanzani n'aime pas la musique.
Oui, je sais! oui, je sais:
tout pour la physique!
to /tmp/foo.txt then I get this set of messages
"message" => "Hoffmann",
"message" => "Monsieur Spalanzani n'aime pas la musique.\nThat's what she said!",
"message" => "Monsieur Spalanzani n'aime pas la musique.\nOui, je sais! oui, je sais:\ntout pour la physique!",
In the gsub you do not need to escape the backslash. The second array entry (the "needle") is a processed as a regexp. So
mutate { gsub => [ "message", "\n", "" ] }
will change that last message to
"message" => "Monsieur Spalanzani n'aime pas la musique.Oui, je sais! oui, je sais:tout pour la physique!",
That looks like your logstash configuration has overwritten the original [message] field with the value of the message={HEADER=... from inside that field.
My first impression is that the filebeat part is working OK. How are you parsing the[message] field in the filter section of logstash?
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.