<?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: Pre-index filtering in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Pre-index-filtering/m-p/53233#M10273</link>
    <description>&lt;P&gt;This is how I got it to work:&lt;/P&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 = \[(authentication failed)\]
DEST_KEY = queue
FORMAT = indexQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;props.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [source:://c:\Programs Files\WebProxyLogs] 
TRANSFORMS-set = setnull,setparsing
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 17 Feb 2012 19:36:59 GMT</pubDate>
    <dc:creator>twkan</dc:creator>
    <dc:date>2012-02-17T19:36:59Z</dc:date>
    <item>
      <title>Pre-index filtering</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Pre-index-filtering/m-p/53230#M10270</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Requirment&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;Drop events before they get sent to the splunk indexer.&lt;/P&gt;

&lt;P&gt;Want to just send the lines with "Authentication_failed" on the file to the indexer.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Information&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Using heavy forwarder and on 4.2.4&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;input.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;c:\splunk\etc\system\local\iputs.conf

[monitor://c:\Programs Files\WebProxyLogs]
sourcetype=WebProxy
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;props.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;c:\splunk\etc\system\local\props.conf

[source:://c:\Programs Files\WebProxyLogs] 
TRANSFORMS-set=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;c:\splunk\etc\system\local\transforms.conf

[setnull] 
REGEX =
DEST_KEY = queue
FORMAT = nullQueue

[setparsing] 
REGEX = \[Authentication_failed\]
DEST_KEY = queue
FORMAT = indexQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Result&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Unable to index the logs&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Problem&lt;/STRONG&gt;&lt;BR /&gt;
In need of guidance on how to solve this problem.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2012 08:25:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Pre-index-filtering/m-p/53230#M10270</guid>
      <dc:creator>leiniao</dc:creator>
      <dc:date>2012-01-18T08:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: Pre-index filtering</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Pre-index-filtering/m-p/53231#M10271</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;[setnull] 
REGEX =
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;is sending everything to the null queue.  Try this:&lt;/P&gt;

&lt;P&gt;Leave transforms.conf as it is.  Change props.conf to specify the order of execution of the transforms. props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source:://c:\Programs Files\WebProxyLogs] 
TRANSFORMS-set1=setparsing
TRANSFORMS-set2=setnull
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I &lt;EM&gt;hope&lt;/EM&gt; that this will first send the chosen events to the index queue, and then everything else to the null queue.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2012 08:42:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Pre-index-filtering/m-p/53231#M10271</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-01-18T08:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: Pre-index filtering</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Pre-index-filtering/m-p/53232#M10272</link>
      <description>&lt;P&gt;Write a regular expression that matches anything EXCEPT the authentication failed string.  This is a hard regex to write, because most tools (like grep) have a "not" switch so that you don't have to put the logic into the actual regex.&lt;BR /&gt;&lt;BR /&gt;
But here is an attempt&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REGEX=^((?!\[Authentication_failed\]).)*$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Put this REGEX in your transforms.conf &lt;CODE&gt;[setnull]&lt;/CODE&gt; instead of&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REGEX=
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In this case, props.conf could stay the same.  I got this idea from &lt;A href="http://stackoverflow.com/questions/406230/regular-expression-to-match-string-not-containing-a-word"&gt;http://stackoverflow.com/questions/406230/regular-expression-to-match-string-not-containing-a-word&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2012 08:54:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Pre-index-filtering/m-p/53232#M10272</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-01-18T08:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: Pre-index filtering</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Pre-index-filtering/m-p/53233#M10273</link>
      <description>&lt;P&gt;This is how I got it to work:&lt;/P&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 = \[(authentication failed)\]
DEST_KEY = queue
FORMAT = indexQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;props.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [source:://c:\Programs Files\WebProxyLogs] 
TRANSFORMS-set = setnull,setparsing
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 17 Feb 2012 19:36:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Pre-index-filtering/m-p/53233#M10273</guid>
      <dc:creator>twkan</dc:creator>
      <dc:date>2012-02-17T19:36:59Z</dc:date>
    </item>
  </channel>
</rss>

