Page 1 of 1

Grok pattern Nxlog configuration wildfly

PostPosted: Thu Jul 07, 2022 5:26 am
Hi community,
currently we are facing the issue to find a grok pattern for wildfly logs when there as a multiline entry like a stacktrace:

Example log entry:
2022-07-07 00:00:10,662 +0200 ERROR [EJB default - 5][] WFLYEJB0020: Error invoking timeout for timer: [id=xxxxxxxxxxxxxxxxxxxxxxxxxxxx timedObjectId=test-service-impl-2022.5.0.test-service-impl-2022.5.0.HomepageJobSchedulers auto-timer?:false persistent?:true previousRun=Wed Jul 06 20:00:00 CEST 2022 initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Thu Jul 07 04:00:00 CEST 2022 timerState=IN_TIMEOUT info=de.scheduler.scheduled.homepage.jobassets.HomepageJobSchedulers] ScheduleExpression [second=0;minute=0;hour=*/4;dayOfMonth=*;month=*;dayOfWeek=1-5;year=*;timezoneID=null;start=null;end=null]: javax.ejb.EJBException: WFLYEJB0442: Unexpected Error
Caused by: java.lang.NoClassDefFoundError: org/jsoup/Jsoup

With online Grok debugger this: %{TIMESTAMP_ISO8601} %{ISO8601_TIMEZONE} %{LOGLEVEL} %{GREEDYDATA} is working fine, but when we insert the same pattern in nxlog configuration file it does not work.

Configuration to send to Nagios Logserver in Json:
<Input in>
Module im_file
File '%WILDFLY_LOG_DIR%\\server2.log'
if match_grok($Message, "%{TEST_LOG}")
log_info('Event did not match any pattern');

Any help or ideas would be fine :D

Kind regards,