<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How can we get the java exception as one event? in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/How-can-we-get-the-java-exception-as-one-event/m-p/345723#M5409</link>
    <description>&lt;P&gt;Perfect @mwirth - I'll try it...&lt;/P&gt;</description>
    <pubDate>Wed, 02 Aug 2017 20:14:18 GMT</pubDate>
    <dc:creator>ddrillic</dc:creator>
    <dc:date>2017-08-02T20:14:18Z</dc:date>
    <item>
      <title>How can we get the java exception as one event?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-can-we-get-the-java-exception-as-one-event/m-p/345721#M5407</link>
      <description>&lt;P&gt;We have data that looks like - &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2017-08-01 13:32:05,079 INFO  [stdout] (ajp-/0.0.0.0:8009-35) LogData[
2017-08-01 13:32:05,079 INFO  [stdout] (ajp-/0.0.0.0:8009-35)   className=UserValidationAppService
2017-08-01 13:32:05,080 INFO  [stdout] (ajp-/0.0.0.0:8009-35)   methodName=UserValidationAppService.validateUser(..)
2017-08-01 13:32:05,080 INFO  [stdout] (ajp-/0.0.0.0:8009-35)   corrId=fbc6c881-1b0b-43c7-83da-07342bc8934d
2017-08-01 13:32:05,080 INFO  [stdout] (ajp-/0.0.0.0:8009-35)   userId=3f499bb6-6838-4c08-badc-c2e13a313901
2017-08-01 13:32:05,080 INFO  [stdout] (ajp-/0.0.0.0:8009-35)   argsArray=[ "3f499bb6-6838-4c08-badc-c2e13a313901", "user", false ]
2017-08-01 13:32:05,080 INFO  [stdout] (ajp-/0.0.0.0:8009-35)   methodEntryTime=2017-08-01T13:32:04.868-05:00
2017-08-01 13:32:05,080 INFO  [stdout] (ajp-/0.0.0.0:8009-35)   methodExitTime=2017-08-01T13:32:05.077-05:00
2017-08-01 13:32:05,080 INFO  [stdout] (ajp-/0.0.0.0:8009-35)   throwable=
2017-08-01 13:32:05,080 INFO  [stdout] (ajp-/0.0.0.0:8009-35) com.xxxxxx.common.exception.ServiceRuntimeException: An error occured while ....
......

2017-08-01 13:32:05,096 INFO  [stdout] (ajp-/0.0.0.0:8009-35)   at java.util.concurrent.FutureTask.run(FutureTask.java:262)
2017-08-01 13:32:05,096 INFO  [stdout] (ajp-/0.0.0.0:8009-35)   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
2017-08-01 13:32:05,096 INFO  [stdout] (ajp-/0.0.0.0:8009-35)   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
2017-08-01 13:32:05,096 INFO  [stdout] (ajp-/0.0.0.0:8009-35)   ... 1 more
2017-08-01 13:32:05,096 INFO  [stdout] (ajp-/0.0.0.0:8009-35)
2017-08-01 13:32:05,096 INFO  [stdout] (ajp-/0.0.0.0:8009-35) ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How can we extract the event to be everything the &lt;CODE&gt;LogData&lt;/CODE&gt; contains between the square brackets with various fields including &lt;CODE&gt;throwable&lt;/CODE&gt; which can be fairly large?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2017 15:42:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-can-we-get-the-java-exception-as-one-event/m-p/345721#M5407</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2017-08-02T15:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: How can we get the java exception as one event?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-can-we-get-the-java-exception-as-one-event/m-p/345722#M5408</link>
      <description>&lt;P&gt;I'm assuming that there are events that truly are only one line mixed with these exception dumps?&lt;/P&gt;

&lt;P&gt;I'd recommend looking into "MUST_BREAK_AFTER" and "MUST_NOT_BREAK_AFTER" in &lt;A href="https://docs.splunk.com/Documentation/Splunk/6.6.2/Admin/Propsconf#Line_breaking" target="_blank"&gt;props.conf&lt;/A&gt;&lt;BR /&gt;
So you'd end up with something like;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;MUST_BREAK_AFTER= \]
MUST_NOT_BREAK_AFTER=\d{4}\-\d{2}\-\d{2}\s\d{2}\:\d{2}\:\d{2}\,\d{3}\s.+?LogData\[
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The idea here is that Splunk will continue to linebreak each line unless it detects that "LogData["  string, at which point it will stop linebreaking until it encounters the close bracket. Hopefully this will make one event out of many.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:08:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-can-we-get-the-java-exception-as-one-event/m-p/345722#M5408</guid>
      <dc:creator>mwirth_splunk</dc:creator>
      <dc:date>2020-09-29T15:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: How can we get the java exception as one event?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-can-we-get-the-java-exception-as-one-event/m-p/345723#M5409</link>
      <description>&lt;P&gt;Perfect @mwirth - I'll try it...&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2017 20:14:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-can-we-get-the-java-exception-as-one-event/m-p/345723#M5409</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2017-08-02T20:14:18Z</dc:date>
    </item>
  </channel>
</rss>

