<?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: Why is my REGEX in transforms.conf not working to filter data to nullQueue? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-REGEX-in-transforms-conf-not-working-to-filter-data-to/m-p/215111#M63064</link>
    <description>&lt;P&gt;A small change to the regex fixed it.  See my edited answer.&lt;/P&gt;</description>
    <pubDate>Thu, 23 Jun 2016 18:18:29 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2016-06-23T18:18:29Z</dc:date>
    <item>
      <title>Why is my REGEX in transforms.conf not working to filter data to nullQueue?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-REGEX-in-transforms-conf-not-working-to-filter-data-to/m-p/215108#M63061</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I want to filter Windows Security event logs in (/etc/system/local/)props.conf/transforms.conf.&lt;/P&gt;

&lt;P&gt;Here is my transforms.conf file: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[FilterEventWindows]
REGEX=(?is)^.*EventCode=(5145|4656).*(Nom de l’objet :\t\t(?!C:\\epic\\*))(.*)$
DEST_KEY = queue
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;ie I only want events 5145|4656 with the ObjectName (of the filesystem) in C:\epic. &lt;/P&gt;

&lt;P&gt;A standard log looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;06/21/2016 02:31:14 PM
LogName=Security
SourceName=Microsoft Windows security auditing.
EventCode=4656
EventType=0
Type=Information
ComputerName= 
TaskCategory=Système de fichiers
OpCode=Informations
RecordNumber=1764752
Keywords=Succès de l’audit
Message=Un handle vers un objet a été demandé.

Sujet :
    ID de sécurité :      TEST\Administrateur
    Nom du compte :     Administrateur
    Domaine du compte :     TEST
    ID d’ouverture de session         0x1C307

Objet :
    Serveur de l’objet :      Security
    Type d’objet :        File
    Nom de l’objet :      C:\Users\Administrateur\Documents
    ID du handle :      0x18b0
    Attributs de ressource :    -

Informations sur le processus :
    ID du processus :       0x7d4
    Nom du processus :      C:\Windows\explorer.exe
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;After testing it on a (PHP) regex tester, it seems it should work...&lt;BR /&gt;
Obviously the problem is not fixed.&lt;BR /&gt;
I tried many things around this syntax, like deleting/adding &lt;CODE&gt;^&lt;/CODE&gt; and &lt;CODE&gt;$&lt;/CODE&gt;, starting without &lt;CODE&gt;.*&lt;/CODE&gt;, specifying &lt;CODE&gt;(?s)(?i)&lt;/CODE&gt; or &lt;CODE&gt;(?si)&lt;/CODE&gt;... I tested this regex with /gsi, /si is right too, but I keep receiving events of other folders.&lt;BR /&gt;
I tried &lt;CODE&gt;Nom de l’objet :\t\t(?!C:\\epic\\*&lt;/CODE&gt; since I can filter eventsID with whitelist, but it is wrong too.&lt;/P&gt;

&lt;P&gt;My props.conf file is simply&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[WinEventLog:Security]
TRANSFORMS-FilterEvent = FilterEventWindows
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Am I missing something?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2016 13:54:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-REGEX-in-transforms-conf-not-working-to-filter-data-to/m-p/215108#M63061</guid>
      <dc:creator>Aexyn</dc:creator>
      <dc:date>2016-06-21T13:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my REGEX in transforms.conf not working to filter data to nullQueue?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-REGEX-in-transforms-conf-not-working-to-filter-data-to/m-p/215109#M63062</link>
      <description>&lt;P&gt;It's not entirely clear what you want the regex to match, but this string matches the event code and the object name.  It works at regex101.com.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?s)EventCode=(5145|4656).*(Nom de l’objet :\s*C:\\(?!epic\\))(.*?)\n
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Jun 2016 17:07:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-REGEX-in-transforms-conf-not-working-to-filter-data-to/m-p/215109#M63062</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2016-06-21T17:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my REGEX in transforms.conf not working to filter data to nullQueue?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-REGEX-in-transforms-conf-not-working-to-filter-data-to/m-p/215110#M63063</link>
      <description>&lt;P&gt;No that was not exactly what I meant, sorry for my bad english.&lt;BR /&gt;
Actually I want the string match with the EventID and with  " Nom de l’objet :        " but NOT with the ObjectName ie the filename (ie the file is not in C:\epic).&lt;/P&gt;

&lt;P&gt;This regex doesn't work since it matchs pretty anything on the folder name.&lt;/P&gt;

&lt;P&gt;About this, it is possible to define a configuration that match the ObjectName to send ONLY the matching logs instead of dropping logs which don't match through nullQueue?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2016 07:02:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-REGEX-in-transforms-conf-not-working-to-filter-data-to/m-p/215110#M63063</guid>
      <dc:creator>Aexyn</dc:creator>
      <dc:date>2016-06-22T07:02:04Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my REGEX in transforms.conf not working to filter data to nullQueue?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-REGEX-in-transforms-conf-not-working-to-filter-data-to/m-p/215111#M63064</link>
      <description>&lt;P&gt;A small change to the regex fixed it.  See my edited answer.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2016 18:18:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-REGEX-in-transforms-conf-not-working-to-filter-data-to/m-p/215111#M63064</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2016-06-23T18:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my REGEX in transforms.conf not working to filter data to nullQueue?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-REGEX-in-transforms-conf-not-working-to-filter-data-to/m-p/215112#M63065</link>
      <description>&lt;P&gt;Mhh this time I'm sure your regex is correct, good job.&lt;BR /&gt;
However, it still doesn't work and I think there is something tricky I don't see in my files.&lt;/P&gt;

&lt;P&gt;Since ObjectName is not directly a field of the log (I mean it is just displayed as a part of the message field), maybe there is a problem :(.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jun 2016 08:10:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-REGEX-in-transforms-conf-not-working-to-filter-data-to/m-p/215112#M63065</guid>
      <dc:creator>Aexyn</dc:creator>
      <dc:date>2016-06-27T08:10:09Z</dc:date>
    </item>
  </channel>
</rss>

