<?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: Group Java Exceptions, even though there is no KV pair in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Group-Java-Exceptions-even-though-there-is-no-KV-pair/m-p/101885#M26315</link>
    <description>&lt;P&gt;&lt;B&gt;If you want it purely inline&lt;/B&gt;, try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=_raw "\b(?&amp;lt;exception_type&amp;gt;(com|java|javax)\.[\w\.]+Exception)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;I&gt;(Match on either "com" or "java" or javax, followed by a dot, and then as many word characters or dots as you need until you finish with "Exception")&lt;/I&gt;&lt;/P&gt;

&lt;P&gt;&lt;B&gt;If you'd rather not have to use it in the search string&lt;/B&gt;, then:&lt;/P&gt;

&lt;P&gt;In transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[exception-type]
REGEX  = \b((com|java|javax)\.[\w\.]+Exception)\b
FORMAT = exception_type::$1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yoursourcetype]
REPORT-exceptions = exception-type
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;B&gt;Or, you can configure an eventtype for each exception type or group of exception types.&lt;/B&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 09 Dec 2010 07:41:08 GMT</pubDate>
    <dc:creator>southeringtonp</dc:creator>
    <dc:date>2010-12-09T07:41:08Z</dc:date>
    <item>
      <title>Group Java Exceptions, even though there is no KV pair</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Group-Java-Exceptions-even-though-there-is-no-KV-pair/m-p/101884#M26314</link>
      <description>&lt;P&gt;I have all types of Java Exceptions within my logs, that have no real form to them, except that they all start with "com." or "java." and end with exactly ".Exception".  &lt;/P&gt;

&lt;P&gt;For example: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;java.lang.IllegalStateException
java.lang.NullPointerException
javax.servlet.ServletException
com.ibm.blah.SomeException
etc.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How can I extract this in-line? &lt;/P&gt;

&lt;P&gt;Thanks, 
    Sean &lt;/P&gt;</description>
      <pubDate>Thu, 09 Dec 2010 06:17:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Group-Java-Exceptions-even-though-there-is-no-KV-pair/m-p/101884#M26314</guid>
      <dc:creator>seanlon11</dc:creator>
      <dc:date>2010-12-09T06:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: Group Java Exceptions, even though there is no KV pair</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Group-Java-Exceptions-even-though-there-is-no-KV-pair/m-p/101885#M26315</link>
      <description>&lt;P&gt;&lt;B&gt;If you want it purely inline&lt;/B&gt;, try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=_raw "\b(?&amp;lt;exception_type&amp;gt;(com|java|javax)\.[\w\.]+Exception)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;I&gt;(Match on either "com" or "java" or javax, followed by a dot, and then as many word characters or dots as you need until you finish with "Exception")&lt;/I&gt;&lt;/P&gt;

&lt;P&gt;&lt;B&gt;If you'd rather not have to use it in the search string&lt;/B&gt;, then:&lt;/P&gt;

&lt;P&gt;In transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[exception-type]
REGEX  = \b((com|java|javax)\.[\w\.]+Exception)\b
FORMAT = exception_type::$1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yoursourcetype]
REPORT-exceptions = exception-type
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;B&gt;Or, you can configure an eventtype for each exception type or group of exception types.&lt;/B&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Dec 2010 07:41:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Group-Java-Exceptions-even-though-there-is-no-KV-pair/m-p/101885#M26315</guid>
      <dc:creator>southeringtonp</dc:creator>
      <dc:date>2010-12-09T07:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: Group Java Exceptions, even though there is no KV pair</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Group-Java-Exceptions-even-though-there-is-no-KV-pair/m-p/101886#M26316</link>
      <description>&lt;P&gt;How do I then reference these fields? I tried the following, but it did not work.  &lt;/P&gt;

&lt;P&gt;eventtype="all_web" *Exception | rex field=_raw ".(?&lt;EXCEPTION_TYPE&gt;(com|java).[\w.]+Exception)" | stats count(exception_type) by host&lt;/EXCEPTION_TYPE&gt;&lt;/P&gt;

&lt;P&gt;Thanks for the help!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:21:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Group-Java-Exceptions-even-though-there-is-no-KV-pair/m-p/101886#M26316</guid>
      <dc:creator>seanlon11</dc:creator>
      <dc:date>2020-09-28T09:21:56Z</dc:date>
    </item>
    <item>
      <title>Re: Group Java Exceptions, even though there is no KV pair</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Group-Java-Exceptions-even-though-there-is-no-KV-pair/m-p/101887#M26317</link>
      <description>&lt;P&gt;I think you have a simple typo. Taking part of your query:&lt;BR /&gt;
    ".(?&lt;EXCEPTION_TYPE&gt;(com|java).[\w.]+Exception)"&lt;BR /&gt;
try this:&lt;BR /&gt;
    ".(&amp;lt;?exception_type&amp;gt;(com|java).[\w.]+Exception)"&lt;/EXCEPTION_TYPE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Dec 2010 07:33:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Group-Java-Exceptions-even-though-there-is-no-KV-pair/m-p/101887#M26317</guid>
      <dc:creator>tedder</dc:creator>
      <dc:date>2010-12-16T07:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: Group Java Exceptions, even though there is no KV pair</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Group-Java-Exceptions-even-though-there-is-no-KV-pair/m-p/101888#M26318</link>
      <description>&lt;P&gt;You're right that it was a typo, but the question mark was in the right place. The leading dot should have been a word breaker ('.' vs '\b'). Edited above to correct.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Dec 2010 22:03:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Group-Java-Exceptions-even-though-there-is-no-KV-pair/m-p/101888#M26318</guid>
      <dc:creator>southeringtonp</dc:creator>
      <dc:date>2010-12-16T22:03:11Z</dc:date>
    </item>
  </channel>
</rss>

