I have a filters like that:
filter { grok { match => { "message" => '%{TIME:timestamp} (\[)?(%{DATA:logger})?(\])? \{%{DATA:thread}\} %{LOGLEVEL:level} : (?<problem>(.|\r|\n)*)' } remove_field => ["message"] } grok { match => { "problem" => ''(?<exception>java(.*)Exception).*\z" } } }
And in regex101 it is working and group exception is what I wanted to achieve.
Sample of problem field:
Problem with cache (get from DB):\njava.lang.NullPointerException: null\n09:56:49.712 pl.com.agora.api.client.rest.invocation.FutureCallbacksSupport {HttpClient@2052321524-scheduler} ERROR : Uri invocation failure callback failed. Invocation : AbstractUriInvocation [successful=false
and so on.
Why it is still telling that exception is the same as problem instead of only: java.lang.NullPointerException