<?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: Reqex filter in transforms.conf not working in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Reqex-filter-in-transforms-conf-not-working/m-p/162106#M32908</link>
    <description>&lt;P&gt;Thank you for your tips, they were helpful.  I swapped the order as you suggested and was able to filter out event types after that.  But I still had an error with my regex which I finally nailed down.  Here is my final transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$SPLUNK_HOME/etc/system/local/transforms.conf

[events-null]
REGEX = .
DEST_KEY = queue
FORMAT = nullQueue

[events-filter]
REGEX=(?msi)^EventCode=(4624|4634|4672|4768|4769|4776)\D
DEST_KEY = queue
FORMAT = indexQueue


[events-null3]
REGEX=(?m)^Logon\sType:\s+3\D
DEST_KEY = queue
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 02 Dec 2013 20:14:05 GMT</pubDate>
    <dc:creator>working_dog</dc:creator>
    <dc:date>2013-12-02T20:14:05Z</dc:date>
    <item>
      <title>Reqex filter in transforms.conf not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Reqex-filter-in-transforms-conf-not-working/m-p/162104#M32906</link>
      <description>&lt;P&gt;At the indexer, I am trying to exclude event records from incoming windows logs that have Logon Type=3.  Below is the configuration that I have, but doesn't seem to work.&lt;/P&gt;

&lt;P&gt;$SPLUNK_HOME/etc/system/local/props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[WinEventLog:Security]    
TRANSFORMS-security= events-null, events-null3, events-filter
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;$SPLUNK_HOME/etc/system/local/transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[events-null]
REGEX = .
DEST_KEY = queue
FORMAT = nullQueue

[events-null3]
REGEX=Logon Type=\s*(3)\D
DEST_KEY = queue
FORMAT = nullQueue

[events-filter]
REGEX=(?msi)^EventCode=(4624|4634|4672|4768|4769|4776)\D
DEST_KEY = queue
FORMAT = indexQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The [events-filter] stanza works.  I only see the events listed. The [events-null3] doesn't work.  I've tried a variety of regex variations.  Many came from different questions posted on this forum.  Here are the ones I've tried:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REGEX=Logon_Type=\s*(3)\D
REGEX=Logon Type=\s*(3)\D
REGEX=Logon_Type=\s*(3)
REGEX=(?msi).Logon\sType:\s3D
REGEX=(?msi).Logon\sType:\s3
REGEX=(?m).*Logon\sType:\s+3.*
REGEX=(?m).Logon\sType:\s+3
REGEX = (?msi).*Logon Type:\s*(2|10)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Below is a sample of an event I am trying to filter out.  &lt;/P&gt;

&lt;HR /&gt;

&lt;PRE&gt;&lt;CODE&gt;12/02/2013 08:45:43 AM
LogName=Security
SourceName=Microsoft Windows security auditing.
EventCode=4634
EventType=0
Type=Information
ComputerName=P-UMS03.p-umhs.med.umich.edu
TaskCategory=Logoff
OpCode=Info
RecordNumber=5744631540
Keywords=Audit Success
Message=An account was logged off.

Subject:
Security ID:        P-UMS\USPCNTBSA1$
Account Name:       USPCNTBSA1$
Account Domain:     P-UMS
Logon ID:       0xb71e31b1

Logon Type:         3
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;HR /&gt;

&lt;P&gt;Thanks for any insight you can provide&lt;/P&gt;

&lt;P&gt;--Mike&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2013 14:35:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Reqex-filter-in-transforms-conf-not-working/m-p/162104#M32906</guid>
      <dc:creator>working_dog</dc:creator>
      <dc:date>2013-12-02T14:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: Reqex filter in transforms.conf not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Reqex-filter-in-transforms-conf-not-working/m-p/162105#M32907</link>
      <description>&lt;P&gt;I believe the third regex from the bottom in your list should work.  I got a similar one to match from the search interface with rex (don't have a convenient props.conf to test with at the moment):&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE&gt;&lt;BR /&gt;
rex ".&lt;EM&gt;(?&amp;lt;foo&amp;gt;Logon Type:\s+\d).&lt;/EM&gt;"&lt;BR /&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;
That said, the transforms stanzas in props.conf are applied in the order they're listed.  In your case, the logon type 3 events match both events-null3 and events-filter.  Are you sure directing to nullqueue takes effect and cancels out the events-filter action?  Try removing events-filter (or swapping the order, though that may have the same problem) and see if the logon type 3 events are dropped properly.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2013 15:44:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Reqex-filter-in-transforms-conf-not-working/m-p/162105#M32907</guid>
      <dc:creator>cphair</dc:creator>
      <dc:date>2013-12-02T15:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: Reqex filter in transforms.conf not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Reqex-filter-in-transforms-conf-not-working/m-p/162106#M32908</link>
      <description>&lt;P&gt;Thank you for your tips, they were helpful.  I swapped the order as you suggested and was able to filter out event types after that.  But I still had an error with my regex which I finally nailed down.  Here is my final transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$SPLUNK_HOME/etc/system/local/transforms.conf

[events-null]
REGEX = .
DEST_KEY = queue
FORMAT = nullQueue

[events-filter]
REGEX=(?msi)^EventCode=(4624|4634|4672|4768|4769|4776)\D
DEST_KEY = queue
FORMAT = indexQueue


[events-null3]
REGEX=(?m)^Logon\sType:\s+3\D
DEST_KEY = queue
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Dec 2013 20:14:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Reqex-filter-in-transforms-conf-not-working/m-p/162106#M32908</guid>
      <dc:creator>working_dog</dc:creator>
      <dc:date>2013-12-02T20:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: Reqex filter in transforms.conf not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Reqex-filter-in-transforms-conf-not-working/m-p/162107#M32909</link>
      <description>&lt;P&gt;Thank you for your tips, they were helpful.  I swapped the order as you suggested and was able to filter out Logon Types after that.  But I still had an error with my regex that was causing all Login Types to be filtered out instead of ony those with a value of 3.  I finally got that fixed,   here is my final transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$SPLUNK_HOME/etc/system/local/transforms.conf

[events-null]
REGEX = .
DEST_KEY = queue
FORMAT = nullQueue

[events-filter]
REGEX=(?msi)^EventCode=(4624|4634|4672|4768|4769|4776)\D
DEST_KEY = queue
FORMAT = indexQueue


[events-null3]
REGEX=(?m)^Logon\sType:\s+3\D
DEST_KEY = queue
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Dec 2013 20:39:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Reqex-filter-in-transforms-conf-not-working/m-p/162107#M32909</guid>
      <dc:creator>working_dog</dc:creator>
      <dc:date>2013-12-02T20:39:36Z</dc:date>
    </item>
    <item>
      <title>Re: Reqex filter in transforms.conf not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Reqex-filter-in-transforms-conf-not-working/m-p/162108#M32910</link>
      <description>&lt;P&gt;In version 6.4 this configuration (props.conf &amp;amp; transforms.conf) needed to be applied on the Universal Forwarder not the indexers. Hopefully that saves some people some time.&lt;/P&gt;</description>
      <pubDate>Mon, 16 May 2016 03:04:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Reqex-filter-in-transforms-conf-not-working/m-p/162108#M32910</guid>
      <dc:creator>cam343</dc:creator>
      <dc:date>2016-05-16T03:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: Reqex filter in transforms.conf not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Reqex-filter-in-transforms-conf-not-working/m-p/162109#M32911</link>
      <description>&lt;P&gt;@cam343 - this is only valid for structured data &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.0/Data/Extractfieldsfromfileswithstructureddata#Forward_data_extracted_from_structured_data_files"&gt;http://docs.splunk.com/Documentation/Splunk/6.4.0/Data/Extractfieldsfromfileswithstructureddata#Forward_data_extracted_from_structured_data_files&lt;/A&gt; and not for all kind of data.&lt;/P&gt;</description>
      <pubDate>Mon, 16 May 2016 03:25:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Reqex-filter-in-transforms-conf-not-working/m-p/162109#M32911</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2016-05-16T03:25:20Z</dc:date>
    </item>
  </channel>
</rss>

