Not all Java classes can be parsed using GROK pattern %{JAVACLASS}


(Olivier Vanekem) #1

I'm writing a Logstash filter (using Logstash 6.4.0) that will filter lots of different applications (some are Spring Boot, some are Wildfly, some uses generated classes from wsdl2java,...).
An issue I face is that the %{JAVACLASS} grok pattern is not alway matching the java class that creates the log.
For example:
ab.cd.ef works
ab_cd does not work
ab.cd_ef works
ab$cd does not work

So I'm going to write my own regex pattern that's not an issue but I was wondering where in code of Logstash I could check the current defined patterns and compare with the ones I am (going to) write?

I found out that at some point there was a number of pattern files in GitHub in directory logstash/patterns (then /java,...) but those have disappeared as of release 2.4 and I must say that I do not know where they are located today...

Olivier


(Christian Stockhaus) #2

all patterns that are used in the logstash grok can be found in a separate plugin under