<?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: Transform to exclude lines in a log and keep the rest in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Transform-to-exclude-lines-in-a-log-and-keep-the-rest/m-p/378238#M68403</link>
    <description>&lt;P&gt;This is the best answer -- you figured it out yourself!  Thanks for the points, and good luck on your Splunk travels!  --rmmiller&lt;/P&gt;</description>
    <pubDate>Tue, 14 Apr 2020 19:29:35 GMT</pubDate>
    <dc:creator>rmmiller</dc:creator>
    <dc:date>2020-04-14T19:29:35Z</dc:date>
    <item>
      <title>Transform to exclude lines in a log and keep the rest</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Transform-to-exclude-lines-in-a-log-and-keep-the-rest/m-p/378234#M68399</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
I need to import a log file in to Splunk however I want to exclude a certain type of entry. The entry to be ignored begins with:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2019-07-03 10:46:10.259  WARN 8944 ---
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The only change to this is the date / time stamp. The log entries I want to index begin with:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2019-07-03 10:46:10.208  INFO 8944 ---
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2019-07-02 13:23:03.194 ERROR 8944 ---
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have tried to implement this using props and transform however it continues to index everything. I've tried a few different options for this and nothing is working as required.&lt;/P&gt;

&lt;P&gt;Currently I have the following:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;props.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[my_log]
MAX_EVENTS = 100000
TRANSFORMS-null = setnull,setparsing
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;transforms.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[setnull]
REGEX = .
DEST_KEY = queue
FORMAT = nullQueue

[setparsing]
REGEX = (?i)(ERROR|INFO)
DEST_KEY = queue
FORMAT = indexQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Can anyone point me in the right direction?&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2019 09:58:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Transform-to-exclude-lines-in-a-log-and-keep-the-rest/m-p/378234#M68399</guid>
      <dc:creator>dfratson</dc:creator>
      <dc:date>2019-07-03T09:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: Transform to exclude lines in a log and keep the rest</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Transform-to-exclude-lines-in-a-log-and-keep-the-rest/m-p/378235#M68400</link>
      <description>&lt;P&gt;Hi @dfratson.&lt;BR /&gt;
You've handled this exercise. I have the same problem. It looks trivially simple, but in practice, SplunkForwarder sends me the entries I deleted with &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[setnull]
 REGEX = .
 DEST_KEY = queue
 FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Apr 2020 13:57:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Transform-to-exclude-lines-in-a-log-and-keep-the-rest/m-p/378235#M68400</guid>
      <dc:creator>arekdabrowski</dc:creator>
      <dc:date>2020-04-09T13:57:42Z</dc:date>
    </item>
    <item>
      <title>Re: Transform to exclude lines in a log and keep the rest</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Transform-to-exclude-lines-in-a-log-and-keep-the-rest/m-p/378236#M68401</link>
      <description>&lt;P&gt;If you are trying this with just your Universal Forwarder, that's the problem.  You can't do this with just the UF.&lt;/P&gt;

&lt;P&gt;See these pages:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/111257/universal-forwarder-nullqueue.html"&gt;https://answers.splunk.com/answers/111257/universal-forwarder-nullqueue.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://wiki.splunk.com/Where_do_I_configure_my_Splunk_settings"&gt;http://wiki.splunk.com/Where_do_I_configure_my_Splunk_settings&lt;/A&gt;&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;If you &lt;EM&gt;are&lt;/EM&gt; trying this with a heavy forwarder or indexer, try a different approach.&lt;BR /&gt;
Your configuration is trying to keep only INFO and ERROR events while filtering out the rest.  Is WARN the only event type you're trying to filter out?  If so, have you tried flipping this around so you're just excluding WARN?&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;props.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[mylog]
TRANSFORMS-null= setnull
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;transforms.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[setnull]
REGEX = (?i)\bWARN\b
DEST_KEY = queue
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Reference:  &lt;A href="https://docs.splunk.com/Documentation/Splunk/8.0.3/Forwarding/Routeandfilterdatad"&gt;https://docs.splunk.com/Documentation/Splunk/8.0.3/Forwarding/Routeandfilterdatad&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Hope that helps!&lt;BR /&gt;
rmmiller&lt;/P&gt;</description>
      <pubDate>Fri, 10 Apr 2020 16:03:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Transform-to-exclude-lines-in-a-log-and-keep-the-rest/m-p/378236#M68401</guid>
      <dc:creator>rmmiller</dc:creator>
      <dc:date>2020-04-10T16:03:04Z</dc:date>
    </item>
    <item>
      <title>Re: Transform to exclude lines in a log and keep the rest</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Transform-to-exclude-lines-in-a-log-and-keep-the-rest/m-p/378237#M68402</link>
      <description>&lt;P&gt;You inspired me, thank you. &lt;BR /&gt;
I solved the problem. &lt;BR /&gt;
It turned out that I'm doing the transformation (transforms.conf) to SplunkForwarder, I moved the transformation to Indexer and now it works. &lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2020 10:08:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Transform-to-exclude-lines-in-a-log-and-keep-the-rest/m-p/378237#M68402</guid>
      <dc:creator>arekdabrowski</dc:creator>
      <dc:date>2020-04-14T10:08:05Z</dc:date>
    </item>
    <item>
      <title>Re: Transform to exclude lines in a log and keep the rest</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Transform-to-exclude-lines-in-a-log-and-keep-the-rest/m-p/378238#M68403</link>
      <description>&lt;P&gt;This is the best answer -- you figured it out yourself!  Thanks for the points, and good luck on your Splunk travels!  --rmmiller&lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2020 19:29:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Transform-to-exclude-lines-in-a-log-and-keep-the-rest/m-p/378238#M68403</guid>
      <dc:creator>rmmiller</dc:creator>
      <dc:date>2020-04-14T19:29:35Z</dc:date>
    </item>
  </channel>
</rss>

