Logstash- getting specific lines

I was wondering if I can get the 10 lines following the Keyword "Exception" in the message field of a Tomcat log file. I am able to get the lines with a specific keyword but failed to get the lines following the line with the keyword.

Thanks.

You can maintain state in an aggregate filter. This post has an example of collecting data in the map and then generating an event when some condition is met.

It is not a scaleable solution and is really not a use case logstash was designed for.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.