Looks like you try to adapt the multiline config from the sample docs. Do log messages always start with a stream ID + timestamp? In this case I would match on the presense of thread ID via ^\[Thread-\d+\] (You will have to adapt the negate and match settings).
vi /tmp/multiline.log --> :set list
[...]
at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:204)$
... 16 common frames omitted$
can you post your complete filebeat configuration (feel free to remove comments)? Filebeat uses YAML, which is sensitive to indentation (always use 2 spaces, no tabs). Your config from first post looks completely off.
This will pretty-print all events to console (instead of sending to elasticsearch), with a custom registry file (such that global state is not overwritten). You get multiline events written to console? I always get confused about match and negate settings. While testing You can try to change those from CLI via -E filebeat.prospectors.0.multiline='{negate: false, match: after}'.
I was "tailing" the debug.log file all the time, thanks for sharing this nice way of testing!
Well, now I'm also really confused about the match & negate settings (I thought I've tried all the possible combinaison, but apparently not)!
I've changed to negate: true & match: after and it seems to work like a charm!
Many thanks for the time you spent (all of you)!
Greg
The multiline indentation was probably incorrect! Thus, filebeat was interpreting the multiline as a field and was not performing the multiline... Sorry
Hi, I am facing issues while handling multiline codec in file beats,
I need to handle below-
app-node1 ERROR exception in executing method
at shared.util.rest.RESTConnector.executeHttpMethod(RESTConnector.java:193) [app-shared-ejb.jar:]
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method) [rt.jar:1.8.0_65]
When I am using below pattern, I am getting single lines in debug mode-
Filebeat config-
output.logstash:
hosts: ["0.0.0.0:5044"]
multiline.pattern: '^[app]'
multiline.negate: true
multiline.match: after
Output I am getting as
message:app-node1 ERROR exception in executing method
message: \t at shared.util.rest.RESTConnector.executeHttpMethod(RESTConnector.java:193) [app-shared-
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.