<?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 make multiple field extractions from my sample data? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-make-multiple-field-extractions-from-my-sample-data/m-p/245285#M73104</link>
    <description>&lt;P&gt;It is extracting those fields because you have some events that look like that.  This search will show you an example of each:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ... | rex "\s+Exception:\s*(?&amp;lt;Exception&amp;gt;\S+)" | dedup Exception | table Exception _raw
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;To get rid of them just tack on this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | fields &amp;lt;list of fields to keep&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 30 Sep 2015 14:24:23 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2015-09-30T14:24:23Z</dc:date>
    <item>
      <title>How to make multiple field extractions from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-make-multiple-field-extractions-from-my-sample-data/m-p/245280#M73099</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have my logs with multiple events for which I have to make field extractions. From the first timestamp, I have to make an extraction for &lt;CODE&gt;System.Net.WebException&lt;/CODE&gt;, from the second timestamp, I have to make for &lt;CODE&gt;Exception:System.AggregateException&lt;/CODE&gt;, and from third timestamp, &lt;CODE&gt;Exception: Error in DB-Logging&lt;/CODE&gt;. With this I have to show total number of counts for each exception event on an hourly basis. Can anybody guide me here on how to do this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIMESTAMP - [2015-09-20 21:04:25.484] THREAD ID - [44] CONTENT - Error in IsDirectoryExists/CreateDirectoryIfNotExists for directory:segro/extracts_upload/ Server: ftp://serverip Excecption: System.Net.WebException: The remote server returned an error: (550) File unavailable (e.g., file not found, no access).
TIMESTAMP - [2015-09-18 04:32:41.068] THREAD ID - [7] CONTENT - Non-recoverable Error occurred, Service will run again after 5 minutes. Exception:System.AggregateException: One or more errors occurred. ---&amp;gt; System.UnauthorizedAccessException: Access to the path 'File path name' is denied.
TIMESTAMP - [2015-09-16 09:15:43.508] THREAD ID - [8] CONTENT - Database Update Error for File: CurrencyExtract.txt DatabaseServer: serverip Exception: Error in DB-Logging(UpsertFtpTransfer): A network-related or instance-specific error occurred while establishing a connection to SQL Server.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2015 11:23:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-make-multiple-field-extractions-from-my-sample-data/m-p/245280#M73099</guid>
      <dc:creator>sunnyparmar</dc:creator>
      <dc:date>2015-09-29T11:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to make multiple field extractions from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-make-multiple-field-extractions-from-my-sample-data/m-p/245281#M73100</link>
      <description>&lt;P&gt;presuming that the first event's "Excecption" is a typo somehow, you could use that pattern to setup transforms to extract that field for this sourcetype&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EXTRACT-extract_ip = \sException:(?.*):
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You'd want to test this out to make sure it covers the sourcetype as you'd want, but this is the general process.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2015 11:57:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-make-multiple-field-extractions-from-my-sample-data/m-p/245281#M73100</guid>
      <dc:creator>muebel</dc:creator>
      <dc:date>2015-09-29T11:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to make multiple field extractions from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-make-multiple-field-extractions-from-my-sample-data/m-p/245282#M73101</link>
      <description>&lt;P&gt;Thanks for the reply but getting the following error if try to changed with my current extraction -&lt;/P&gt;

&lt;P&gt;Encountered the following error while trying to update: In handler 'props-extract': Regex: unrecognized character after (? or (?-&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2015 12:22:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-make-multiple-field-extractions-from-my-sample-data/m-p/245282#M73101</guid>
      <dc:creator>sunnyparmar</dc:creator>
      <dc:date>2015-09-29T12:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to make multiple field extractions from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-make-multiple-field-extractions-from-my-sample-data/m-p/245283#M73102</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex "\s+Exception:\s*(?&amp;lt;Exception&amp;gt;\S+)" | timechart span=1h count by Exception
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2015 19:19:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-make-multiple-field-extractions-from-my-sample-data/m-p/245283#M73102</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-09-29T19:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to make multiple field extractions from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-make-multiple-field-extractions-from-my-sample-data/m-p/245284#M73103</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Thanks for replying and the query given. it is giving result but with that it is  fetching some extra fields from column like Could, NULL, Unable so could you please suggest why extraction fetching these fields? Do we need to modify more. &lt;BR /&gt;
Thanks &amp;amp; Regards&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2015 08:11:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-make-multiple-field-extractions-from-my-sample-data/m-p/245284#M73103</guid>
      <dc:creator>sunnyparmar</dc:creator>
      <dc:date>2015-09-30T08:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to make multiple field extractions from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-make-multiple-field-extractions-from-my-sample-data/m-p/245285#M73104</link>
      <description>&lt;P&gt;It is extracting those fields because you have some events that look like that.  This search will show you an example of each:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ... | rex "\s+Exception:\s*(?&amp;lt;Exception&amp;gt;\S+)" | dedup Exception | table Exception _raw
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;To get rid of them just tack on this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | fields &amp;lt;list of fields to keep&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Sep 2015 14:24:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-make-multiple-field-extractions-from-my-sample-data/m-p/245285#M73104</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-09-30T14:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to make multiple field extractions from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-make-multiple-field-extractions-from-my-sample-data/m-p/245286#M73105</link>
      <description>&lt;P&gt;With your first query still it is fetching that columns and yes currently i am doing in this way as you previous also told me in my some another question but i want to avoid these columns without taking help of "fields" . With this I think extraction is not giving the exact result because it is fetching the next word "could" after the "Exception" event. In my logs file in some lines after exception word there is line "could not find the file" so it is fetching "could"  word in output from this line. So do you have any suggestion regarding this? &lt;BR /&gt;
Regards&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2015 14:32:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-make-multiple-field-extractions-from-my-sample-data/m-p/245286#M73105</guid>
      <dc:creator>sunnyparmar</dc:creator>
      <dc:date>2015-09-30T14:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to make multiple field extractions from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-make-multiple-field-extractions-from-my-sample-data/m-p/245287#M73106</link>
      <description>&lt;P&gt;If you give a sample of each log variation, we can work on updating the &lt;CODE&gt;regex&lt;/CODE&gt; command to properly accommodate all variations.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2015 14:40:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-make-multiple-field-extractions-from-my-sample-data/m-p/245287#M73106</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-09-30T14:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to make multiple field extractions from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-make-multiple-field-extractions-from-my-sample-data/m-p/245288#M73107</link>
      <description>&lt;P&gt;I have my logs with multiple events for which I have to make field extractions. From the first timestamp, I have to make an extraction for System.Net.WebException, from the second timestamp, I have to make for Exception:System.AggregateException, and from third timestamp, Exception: Error in DB-Logging. In fourth time stamp if you will see that is also related to DB-logging error but it has word "could" also which is fetching in your previous regex command. With this I have to show total number of counts for each exception event on an hourly basis. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; TIMESTAMP - [2015-09-20 21:04:25.484] THREAD ID - [44] CONTENT - Error in IsDirectoryExists/CreateDirectoryIfNotExists for directory:segro/extracts_upload/ Server: ftp://serverip Excecption: System.Net.WebException: The remote server returned an error: (550) File unavailable (e.g., file not found, no access).
 TIMESTAMP - [2015-09-18 04:32:41.068] THREAD ID - [7] CONTENT - Non-recoverable Error occurred, Service will run again after 5 minutes. Exception:System.AggregateException: One or more errors occurred. ---&amp;gt; System.UnauthorizedAccessException: Access to the path 'File path name' is denied.
 TIMESTAMP - [2015-09-16 09:15:43.508] THREAD ID - [8] CONTENT - Database Update Error for File: CurrencyExtract.txt DatabaseServer: serverip Exception: Error in DB-Logging(UpsertFtpTransfer): A network-related or instance-specific error occurred while establishing a connection to SQL Server.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;TIMESTAMP - [2015-09-16 09:13:40.558] THREAD ID - [20] CONTENT - Database Update Error for File: 003701466427_SupplierExtract.txt DatabaseServer: 10.0.22.52 Exception: Error in DB-Logging(UpsertFtpTransfer): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) &lt;/P&gt;

&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Thu, 01 Oct 2015 05:29:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-make-multiple-field-extractions-from-my-sample-data/m-p/245288#M73107</guid>
      <dc:creator>sunnyparmar</dc:creator>
      <dc:date>2015-10-01T05:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to make multiple field extractions from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-make-multiple-field-extractions-from-my-sample-data/m-p/245289#M73108</link>
      <description>&lt;P&gt;Hi, any update? Thanks&lt;/P&gt;</description>
      <pubDate>Sun, 04 Oct 2015 08:56:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-make-multiple-field-extractions-from-my-sample-data/m-p/245289#M73108</guid>
      <dc:creator>sunnyparmar</dc:creator>
      <dc:date>2015-10-04T08:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to make multiple field extractions from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-make-multiple-field-extractions-from-my-sample-data/m-p/245290#M73109</link>
      <description>&lt;P&gt;Switch to this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex "\s+Exception:\s*(?&amp;lt;Exception&amp;gt;[^:]+)" | dedup Exception | table Exception _raw
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 04 Oct 2015 14:29:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-make-multiple-field-extractions-from-my-sample-data/m-p/245290#M73109</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-10-04T14:29:05Z</dc:date>
    </item>
  </channel>
</rss>

