<?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 Regex to extract exceptionmessage in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-extract-exceptionmessage/m-p/197375#M57026</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have five different types of exceptions and for that messages are logged as shown below :&lt;/P&gt;

&lt;P&gt;ClientIp=065162175003 :  - caught&lt;BR /&gt;
com.wu.ws.WUWSException: WS000:WUWSException occured while executing the web service&lt;BR /&gt;
    at sun.reflect.GeneratedConstructorAccessor721&lt;/P&gt;

&lt;P&gt;ClientIp=065162175003 :  - caught&lt;BR /&gt;
com.wu.ws.WUWSException: WS000:WUWSException occured while executing the web service&lt;BR /&gt;
    at&lt;/P&gt;

&lt;P&gt;ClientIp=065162175003 :  - Exception while getting fileApolloWhitelistedCredentials.properties ResourceHandler:getConfirationProperties() &lt;BR /&gt;
java.io.FileNotFoundException: /apps/mobiliser5.1.0/02/money/conf/ApolloWhitelistedCredentials.properties (No such file or directory)&lt;BR /&gt;
    at &lt;BR /&gt;
ClientIp=220227031066 :  - caught&lt;BR /&gt;
com.wu.ws.UserIDNotFoundException: W0334:The User Name you entered is incorrect. Please try again.&lt;BR /&gt;
    at&lt;/P&gt;

&lt;P&gt;ClientIp=065162175003 :  - caught&lt;BR /&gt;
com.wu.ws.WUWSException: WS000:WUWSException occured while executing the web service&lt;BR /&gt;
    at &lt;/P&gt;

&lt;P&gt;ClientIp=220227031066 :  - caught&lt;BR /&gt;
com.sybase365.mobiliser.custom.project.businesslogic.exceptions.WuCustomerLoginException: Failed to login through xx.com by identification: &lt;A href="mailto:test@MAIINATOR.COM"&gt;test@MAIINATOR.COM&lt;/A&gt;&lt;BR /&gt;
    at &lt;/P&gt;

&lt;P&gt;Here i need extract the exception message alone in regex[ keeping &lt;STRONG&gt;ClientIp=&lt;/STRONG&gt; as the front reference and &lt;STRONG&gt;at&lt;/STRONG&gt; as the end reference- need to extract text between of that] using regex&lt;/P&gt;

&lt;P&gt;Please let me know the regex query for the same&lt;/P&gt;</description>
    <pubDate>Fri, 07 Nov 2014 10:34:05 GMT</pubDate>
    <dc:creator>Bhuavana</dc:creator>
    <dc:date>2014-11-07T10:34:05Z</dc:date>
    <item>
      <title>Regex to extract exceptionmessage</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-extract-exceptionmessage/m-p/197375#M57026</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have five different types of exceptions and for that messages are logged as shown below :&lt;/P&gt;

&lt;P&gt;ClientIp=065162175003 :  - caught&lt;BR /&gt;
com.wu.ws.WUWSException: WS000:WUWSException occured while executing the web service&lt;BR /&gt;
    at sun.reflect.GeneratedConstructorAccessor721&lt;/P&gt;

&lt;P&gt;ClientIp=065162175003 :  - caught&lt;BR /&gt;
com.wu.ws.WUWSException: WS000:WUWSException occured while executing the web service&lt;BR /&gt;
    at&lt;/P&gt;

&lt;P&gt;ClientIp=065162175003 :  - Exception while getting fileApolloWhitelistedCredentials.properties ResourceHandler:getConfirationProperties() &lt;BR /&gt;
java.io.FileNotFoundException: /apps/mobiliser5.1.0/02/money/conf/ApolloWhitelistedCredentials.properties (No such file or directory)&lt;BR /&gt;
    at &lt;BR /&gt;
ClientIp=220227031066 :  - caught&lt;BR /&gt;
com.wu.ws.UserIDNotFoundException: W0334:The User Name you entered is incorrect. Please try again.&lt;BR /&gt;
    at&lt;/P&gt;

&lt;P&gt;ClientIp=065162175003 :  - caught&lt;BR /&gt;
com.wu.ws.WUWSException: WS000:WUWSException occured while executing the web service&lt;BR /&gt;
    at &lt;/P&gt;

&lt;P&gt;ClientIp=220227031066 :  - caught&lt;BR /&gt;
com.sybase365.mobiliser.custom.project.businesslogic.exceptions.WuCustomerLoginException: Failed to login through xx.com by identification: &lt;A href="mailto:test@MAIINATOR.COM"&gt;test@MAIINATOR.COM&lt;/A&gt;&lt;BR /&gt;
    at &lt;/P&gt;

&lt;P&gt;Here i need extract the exception message alone in regex[ keeping &lt;STRONG&gt;ClientIp=&lt;/STRONG&gt; as the front reference and &lt;STRONG&gt;at&lt;/STRONG&gt; as the end reference- need to extract text between of that] using regex&lt;/P&gt;

&lt;P&gt;Please let me know the regex query for the same&lt;/P&gt;</description>
      <pubDate>Fri, 07 Nov 2014 10:34:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-to-extract-exceptionmessage/m-p/197375#M57026</guid>
      <dc:creator>Bhuavana</dc:creator>
      <dc:date>2014-11-07T10:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to extract exceptionmessage</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-extract-exceptionmessage/m-p/197376#M57027</link>
      <description>&lt;P&gt;It's not clear exactly what text you're trying to extract.  Please tell what your expected output is.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Nov 2014 13:12:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-to-extract-exceptionmessage/m-p/197376#M57027</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2014-11-07T13:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to extract exceptionmessage</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-extract-exceptionmessage/m-p/197377#M57028</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rex "(?P&amp;lt;exception_msg&amp;gt;ClientIp=\d{12} : - Exception [^\n]+? at)\n"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I've made a couple of assumptions:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;ClientIp= is always followed by exactly 12 digits&lt;/LI&gt;
&lt;LI&gt;That immediately after the ending "at" there is a new line&lt;/LI&gt;
&lt;LI&gt;You want to include both the strings "ClientIp" and "at" in your extraction&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Hope this helps&lt;/P&gt;</description>
      <pubDate>Fri, 07 Nov 2014 16:30:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-to-extract-exceptionmessage/m-p/197377#M57028</guid>
      <dc:creator>aholzer</dc:creator>
      <dc:date>2014-11-07T16:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to extract exceptionmessage</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-extract-exceptionmessage/m-p/197378#M57029</link>
      <description>&lt;P&gt;Thanks for the update. With few modiifcations im able to fetch half of the message using below regex&lt;/P&gt;

&lt;P&gt;| rex field=_raw "ClientIp=\d{12} :  - (?(.)+[\n at])"&lt;/P&gt;

&lt;P&gt;But above one is skipping message which is at next line.&lt;/P&gt;

&lt;P&gt;Any idea how to fetch text at next line?&lt;/P&gt;

&lt;P&gt;For ex:&lt;/P&gt;

&lt;P&gt;In below log:&lt;/P&gt;

&lt;P&gt;ClientIp=065162175003 : - Exception while getting fileApolloWhitelistedCredentials.properties &lt;BR /&gt;
ResourceHandler:getConfirationProperties() &lt;BR /&gt;
java.io.FileNotFoundException: /apps/mobiliser5.1.0/02/money/conf/ApolloWhitelistedCredentials.properties (No such file or directory)&lt;BR /&gt;
 at &lt;/P&gt;

&lt;P&gt;With my above expression im able to get below text alone :&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Exception while getting fileApolloWhitelistedCredentials.properties&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;But next line starting with &lt;STRONG&gt;ResourceHandler.....&lt;/STRONG&gt; and &lt;STRONG&gt;java.io.&lt;/STRONG&gt; is not extracted.&lt;/P&gt;

&lt;P&gt;Please help to extract the same&amp;gt;?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Nov 2014 07:10:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-to-extract-exceptionmessage/m-p/197378#M57029</guid>
      <dc:creator>Bhuavana</dc:creator>
      <dc:date>2014-11-11T07:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to extract exceptionmessage</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-extract-exceptionmessage/m-p/197379#M57030</link>
      <description>&lt;P&gt;I need to extract message like [for ex: Exception while getting fileApolloWhitelistedCredentials.properties ResourceHandler:getConfirationProperties() &lt;BR /&gt;
java.io.FileNotFoundException: /apps/mobiliser5.1.0/02/money/conf/ApolloWhitelistedCredentials.properties (No such file or directory] from above logs.&lt;BR /&gt;
Similar to above text, from above logs text  which starts next to  &lt;STRONG&gt;: -&lt;/STRONG&gt;   and ends at [&lt;STRONG&gt;at&lt;/STRONG&gt;]&lt;/P&gt;</description>
      <pubDate>Tue, 11 Nov 2014 07:12:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-to-extract-exceptionmessage/m-p/197379#M57030</guid>
      <dc:creator>Bhuavana</dc:creator>
      <dc:date>2014-11-11T07:12:34Z</dc:date>
    </item>
  </channel>
</rss>

