I am trying to setup ELK for a Java application. The tomcat logs are produced using log4j. To write a test a pattern, I am using Grok Debugger. But on the debugger it always shows
Compile ERROR
My log sample:
YYYY-MM-DD HH:MM:SS,SSS INFO : [so-me-uni-que-id] com.xx.xx.xx.xx.xx - log message here
My grok filter:
filter { if [type] == "tomcat" { grok { match => { "message" => "%{TOMCATLOG}" } } date { match => [ "timestamp", "yyyy-MM-dd HH:mm:ss,SSS" ] } } }
My pattern:
TOMCATLOG %{TOMCAT_DATESTAMP:timestamp} \| %{LOGLEVEL:level} \| %{UNIQUEID:uniqueid}\| %{JAVACLASS:class} - %{JAVALOGMESSAGE:logmessage}