Splunk Search

stderr gives multiple events

perseger
Explorer

Hi,

We have some 3rd party library that writes one stack trace to STDERR which ends up as multiple rows in the log file:

2013-04-14 18:20:44,268 ERROR [] [STDERR] org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor 'public com.ongame.ip.promoweb.markup.pages.PromoWeb(org.apache.wicket.request.mapper.parameter.PageParameters)' and argument 'operatorID=[xxx], token=[xxx], lang=[sv], clientCode=[xxx]'. Might be it doesn't exist, may be it is not visible (public).
2013-04-14 18:20:44,268 ERROR [] [STDERR] at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:196)
2013-04-14 18:20:44,268 ERROR [] [STDERR] at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:97)
2013-04-14 18:20:44,268 ERROR [] [STDERR] at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:47)
2013-04-14 18:20:44,268 ERROR [] [STDERR] ... 100 lines more

Each row in the stack trace gives a separate event in the Splunk index. Is there a way to concatenate this to one event?
We use log4j as logging framework. We have Splunk 4.3.2

Thanks

Tags (1)
0 Karma
1 Solution

perseger
Explorer

Thanks,
however the regexp can be really complicated since we have to consider several threads writing to the log file concurrently (both stderr and normal logging). It can be hard to determine to which event a line belong to.
For now we'll redirect stderr to separate log file and exclude it from Splunk.

0 Karma
Get Updates on the Splunk Community!

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...