<?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 matching different types of exception in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/matching-different-types-of-exception/m-p/111291#M29162</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I've to match 3 to 4 types of different types of exception and then tag them as Type_exception.&lt;/P&gt;

&lt;P&gt;sample log :&lt;/P&gt;

&lt;P&gt;09 Sep 2013 12:25:45,222 [ExecuteThread: '22' for queue: 'default'] ERROR - Remote Exception Exceptionjava.rmi.&lt;STRONG&gt;RemoteException&lt;/STRONG&gt;: EJB Exception: ; nested exception is: &lt;BR /&gt;
    java.lang.NullPointerException&lt;BR /&gt;
Start server side stack trace:&lt;BR /&gt;
java.rmi.RemoteException: EJB Exception: ; nested exception is: &lt;BR /&gt;
    java.lang.NullPointerException&lt;/P&gt;

&lt;P&gt;09 Sep 2013 18:04:00,438 [ExecuteThread: '28' for queue: 'default'] ERROR - Exception Exceptionjava.lang.&lt;STRONG&gt;NullPointerException&lt;/STRONG&gt; &amp;lt;&amp;gt; &lt;BR /&gt;
java.lang.NullPointerException&lt;/P&gt;

&lt;P&gt;09 Sep 2013 11:01:37,000 [ExecuteThread: '22' for queue: 'default'] ERROR - Exception Exceptionjava.lang.IllegalStateException: HttpSession is invalid &amp;lt;&amp;gt; &lt;BR /&gt;
java.lang.&lt;STRONG&gt;IllegalStateException&lt;/STRONG&gt;: HttpSession is invalid&lt;/P&gt;

&lt;P&gt;How to match exception like remoteexception, NullPointerException, IllegalStateException?&lt;/P&gt;

&lt;P&gt;There may be other exception too!.&lt;BR /&gt;
Do we've to write separate regex for each different exception?&lt;/P&gt;

&lt;P&gt;Is other any other way?&lt;BR /&gt;
Finall we're trying to plot chart showing these many different types exception occurred at different times?&lt;BR /&gt;
Is this possible?&lt;/P&gt;</description>
    <pubDate>Wed, 23 Oct 2013 10:56:09 GMT</pubDate>
    <dc:creator>prad18</dc:creator>
    <dc:date>2013-10-23T10:56:09Z</dc:date>
    <item>
      <title>matching different types of exception</title>
      <link>https://community.splunk.com/t5/Splunk-Search/matching-different-types-of-exception/m-p/111291#M29162</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I've to match 3 to 4 types of different types of exception and then tag them as Type_exception.&lt;/P&gt;

&lt;P&gt;sample log :&lt;/P&gt;

&lt;P&gt;09 Sep 2013 12:25:45,222 [ExecuteThread: '22' for queue: 'default'] ERROR - Remote Exception Exceptionjava.rmi.&lt;STRONG&gt;RemoteException&lt;/STRONG&gt;: EJB Exception: ; nested exception is: &lt;BR /&gt;
    java.lang.NullPointerException&lt;BR /&gt;
Start server side stack trace:&lt;BR /&gt;
java.rmi.RemoteException: EJB Exception: ; nested exception is: &lt;BR /&gt;
    java.lang.NullPointerException&lt;/P&gt;

&lt;P&gt;09 Sep 2013 18:04:00,438 [ExecuteThread: '28' for queue: 'default'] ERROR - Exception Exceptionjava.lang.&lt;STRONG&gt;NullPointerException&lt;/STRONG&gt; &amp;lt;&amp;gt; &lt;BR /&gt;
java.lang.NullPointerException&lt;/P&gt;

&lt;P&gt;09 Sep 2013 11:01:37,000 [ExecuteThread: '22' for queue: 'default'] ERROR - Exception Exceptionjava.lang.IllegalStateException: HttpSession is invalid &amp;lt;&amp;gt; &lt;BR /&gt;
java.lang.&lt;STRONG&gt;IllegalStateException&lt;/STRONG&gt;: HttpSession is invalid&lt;/P&gt;

&lt;P&gt;How to match exception like remoteexception, NullPointerException, IllegalStateException?&lt;/P&gt;

&lt;P&gt;There may be other exception too!.&lt;BR /&gt;
Do we've to write separate regex for each different exception?&lt;/P&gt;

&lt;P&gt;Is other any other way?&lt;BR /&gt;
Finall we're trying to plot chart showing these many different types exception occurred at different times?&lt;BR /&gt;
Is this possible?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2013 10:56:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/matching-different-types-of-exception/m-p/111291#M29162</guid>
      <dc:creator>prad18</dc:creator>
      <dc:date>2013-10-23T10:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: matching different types of exception</title>
      <link>https://community.splunk.com/t5/Splunk-Search/matching-different-types-of-exception/m-p/111292#M29163</link>
      <description>&lt;P&gt;Given the limited amount of events you provide, the following will extract the exceptions;&lt;/P&gt;

&lt;P&gt;in props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[your_sourcetype_here]
EXTRACT-java_exceptions = Exceptionjava\.[a-z]+\.(?&amp;lt;exception&amp;gt;\S+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then you can define an &lt;CODE&gt;eventtype&lt;/CODE&gt; based on the following search;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=your_sourcetype exception=*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Classifyandgroupsimilarevents#Save_a_search_as_a_new_event_type"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Classifyandgroupsimilarevents#Save_a_search_as_a_new_event_type&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;After that you can search for &lt;CODE&gt;eventtype=javaexception&lt;/CODE&gt; (or whatever you called your eventtype in the previous step).&lt;/P&gt;

&lt;P&gt;Hope this helps,&lt;/P&gt;

&lt;P&gt;K&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2013 14:24:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/matching-different-types-of-exception/m-p/111292#M29163</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-10-23T14:24:01Z</dc:date>
    </item>
    <item>
      <title>Re: matching different types of exception</title>
      <link>https://community.splunk.com/t5/Splunk-Search/matching-different-types-of-exception/m-p/111293#M29164</link>
      <description>&lt;P&gt;Kristian,&lt;BR /&gt;
I'm not expert in regular exp but can we match&lt;BR /&gt;
1. xx.xxx.xxx.exceptionname&lt;BR /&gt;
2. xxx.exceptionname&lt;BR /&gt;
3. xxxxx.exceptionname&lt;/P&gt;

&lt;P&gt;all these with single regular expression?&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2013 10:52:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/matching-different-types-of-exception/m-p/111293#M29164</guid>
      <dc:creator>prad18</dc:creator>
      <dc:date>2013-10-24T10:52:25Z</dc:date>
    </item>
    <item>
      <title>Re: matching different types of exception</title>
      <link>https://community.splunk.com/t5/Splunk-Search/matching-different-types-of-exception/m-p/111294#M29165</link>
      <description>&lt;P&gt;yes you can. &lt;/P&gt;

&lt;P&gt;Maybe something like;&lt;BR /&gt;
   &lt;CODE&gt;\s(?:[^.]+\.)+(?&amp;lt;exception&amp;gt;\S+)\s&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;which reads; space, one or more non-dot characters followed by a dot, one or more times, followed by one or more non-space characters (this is what we extract as a field), followed by space.  &lt;/P&gt;

&lt;P&gt;sorry for the delay in responding.&lt;/P&gt;

&lt;P&gt;/k&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2013 20:12:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/matching-different-types-of-exception/m-p/111294#M29165</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-10-29T20:12:17Z</dc:date>
    </item>
  </channel>
</rss>

