<?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 Collect specific rows of a trace file in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/Collect-specific-rows-of-a-trace-file/m-p/21860#M164</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Is it possible to collect specific rows of a trace file?&lt;/P&gt;

&lt;P&gt;I have one trace file that contains Info traces and Error traces.&lt;BR /&gt;
I'd like Splunk to collect only the error lines.&lt;/P&gt;

&lt;P&gt;For example, below are 2 rows in the trace file:&lt;/P&gt;

&lt;P&gt;Time: 07/31/2013 10:35:30, Content: MyInfoMessage, Severity: &lt;STRONG&gt;Information&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Time: 07/31/2013 10:45:30, Content: MyInfoMessage, Severity: &lt;STRONG&gt;Error&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;I'd like to collect with Splunk the second line only, the one that contains "Severity: Error"&lt;/P&gt;

&lt;P&gt;Is thre any idea how to do this?&lt;/P&gt;</description>
    <pubDate>Thu, 01 Aug 2013 13:39:10 GMT</pubDate>
    <dc:creator>avitallange</dc:creator>
    <dc:date>2013-08-01T13:39:10Z</dc:date>
    <item>
      <title>Collect specific rows of a trace file</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Collect-specific-rows-of-a-trace-file/m-p/21860#M164</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Is it possible to collect specific rows of a trace file?&lt;/P&gt;

&lt;P&gt;I have one trace file that contains Info traces and Error traces.&lt;BR /&gt;
I'd like Splunk to collect only the error lines.&lt;/P&gt;

&lt;P&gt;For example, below are 2 rows in the trace file:&lt;/P&gt;

&lt;P&gt;Time: 07/31/2013 10:35:30, Content: MyInfoMessage, Severity: &lt;STRONG&gt;Information&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Time: 07/31/2013 10:45:30, Content: MyInfoMessage, Severity: &lt;STRONG&gt;Error&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;I'd like to collect with Splunk the second line only, the one that contains "Severity: Error"&lt;/P&gt;

&lt;P&gt;Is thre any idea how to do this?&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2013 13:39:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Collect-specific-rows-of-a-trace-file/m-p/21860#M164</guid>
      <dc:creator>avitallange</dc:creator>
      <dc:date>2013-08-01T13:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: Collect specific rows of a trace file</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Collect-specific-rows-of-a-trace-file/m-p/21861#M165</link>
      <description>&lt;P&gt;The usual way to do this would be to prompt Splunk to drop the messages that are "Severity: Information". This is done with a parse-time transform to set the _queue metadata field for that event to nullQueue. An example is shown below. The assumption is that your sourcetype for the data is "my_sourcetype".&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;BR /&gt;
[my_sourcetype]&lt;BR /&gt;
TRANSFORMS-0_null_queue = drop_information_messages&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;BR /&gt;
[drop_information_messages]&lt;BR /&gt;
REGEX = Severity:\sInformation&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = nullQueue&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;See &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Admin/Transformsconf"&gt;transforms.conf&lt;/A&gt; and look for nullQueue.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2013 14:26:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Collect-specific-rows-of-a-trace-file/m-p/21861#M165</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2013-08-01T14:26:06Z</dc:date>
    </item>
  </channel>
</rss>

