<?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 to extract text from an error message in a log that follows a pattern? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-text-from-an-error-message-in-a-log-that-follows/m-p/111424#M29196</link>
    <description>&lt;P&gt;The suggested regex works great.  My problem now is that there is another line in the logs that matches the format of the one I want.  The data I want contains the text "log error".  The data I do NOT want contains the test "log info".  Is there a way to modify the regex to exclude the "log info" lines?&lt;/P&gt;</description>
    <pubDate>Tue, 24 Jun 2014 16:04:39 GMT</pubDate>
    <dc:creator>Bliide</dc:creator>
    <dc:date>2014-06-24T16:04:39Z</dc:date>
    <item>
      <title>How to extract text from an error message in a log that follows a pattern?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-text-from-an-error-message-in-a-log-that-follows/m-p/111422#M29194</link>
      <description>&lt;P&gt;I am battling a field extraction.  I am trying to get the text extracted from an error message in a log that follows a pattern.  Here are a couple of examples of lines in the log:&lt;/P&gt;

&lt;P&gt;LOG ERROR:6/6/2014 3:37 PM:Error during accepting socket connection - A blocking operation was interrupted by a call to WSACancelBlockingCall&lt;BR /&gt;&lt;BR /&gt;
LOG ERROR:6/5/2014 1:21 PM:NHibernate.dll wasn't found. NHibernate Service Browser and Handler won't be working&lt;/P&gt;

&lt;P&gt;I am trying to extract the text after "LOG ERROR:6/6/2014 3:37 PM:".  I have tried the following extraction:&lt;/P&gt;

&lt;P&gt;(?i)\w+\s+\w+:\d+/\d+/\d+\s+\d+:\d+\s+\w+: (?P&lt;FIELDNAME&gt;.+)  &lt;/FIELDNAME&gt;&lt;/P&gt;

&lt;P&gt;What am I missing?  The field extraction fails.  I do not know if I have an error in the REGEX or in the general layout of the field extraction.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jun 2014 14:43:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-text-from-an-error-message-in-a-log-that-follows/m-p/111422#M29194</guid>
      <dc:creator>Bliide</dc:creator>
      <dc:date>2014-06-19T14:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract text from an error message in a log that follows a pattern?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-text-from-an-error-message-in-a-log-that-follows/m-p/111423#M29195</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; "(?i)^(?:[^:]*:){3}(?P&amp;lt;ErrorMessage&amp;gt;.+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Updated:&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"(?i)^LOG ERROR(?:[^:]*:){3}(?P&amp;lt;ErrorMessage&amp;gt;.+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 19 Jun 2014 14:55:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-text-from-an-error-message-in-a-log-that-follows/m-p/111423#M29195</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-06-19T14:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract text from an error message in a log that follows a pattern?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-text-from-an-error-message-in-a-log-that-follows/m-p/111424#M29196</link>
      <description>&lt;P&gt;The suggested regex works great.  My problem now is that there is another line in the logs that matches the format of the one I want.  The data I want contains the text "log error".  The data I do NOT want contains the test "log info".  Is there a way to modify the regex to exclude the "log info" lines?&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jun 2014 16:04:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-text-from-an-error-message-in-a-log-that-follows/m-p/111424#M29196</guid>
      <dc:creator>Bliide</dc:creator>
      <dc:date>2014-06-24T16:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract text from an error message in a log that follows a pattern?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-text-from-an-error-message-in-a-log-that-follows/m-p/111425#M29197</link>
      <description>&lt;P&gt;do in 2 parts : a search condition to find all the errors events, and then a field extraction to generate the new field.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&amp;lt;mysearch&amp;gt; "LOG ERROR" | rex "(?i)^(?:[^:]*:){3}(?P&amp;lt;ErrorMessage&amp;gt;.+)" | table ErrorMessage&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jun 2014 17:11:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-text-from-an-error-message-in-a-log-that-follows/m-p/111425#M29197</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2014-06-24T17:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract text from an error message in a log that follows a pattern?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-text-from-an-error-message-in-a-log-that-follows/m-p/111426#M29198</link>
      <description>&lt;P&gt;hi , i have the logs followed with the structure like this:&lt;BR /&gt;
...... - Start Performance Logging: [txID=12345678910-EJBClient987654321-EJBServer45678910; method=getValue]&lt;/P&gt;

&lt;P&gt;how can i extract the EJBServer45678910- theses values from the txID ?&lt;/P&gt;

&lt;P&gt;I would be greatful for the response. Since from my of my logs i have to extract the EJBServerxxxxxx values.,&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2015 10:24:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-text-from-an-error-message-in-a-log-that-follows/m-p/111426#M29198</guid>
      <dc:creator>rakeshkumar_sah</dc:creator>
      <dc:date>2015-11-12T10:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract text from an error message in a log that follows a pattern?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-text-from-an-error-message-in-a-log-that-follows/m-p/111427#M29199</link>
      <description>&lt;P&gt;Please post a new question instead of hijacking an old question.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2015 18:25:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-text-from-an-error-message-in-a-log-that-follows/m-p/111427#M29199</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2015-11-12T18:25:40Z</dc:date>
    </item>
  </channel>
</rss>

