<?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: REGEX in transforms for windows path and EventCode in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/REGEX-in-transforms-for-windows-path-and-EventCode/m-p/40482#M9328</link>
    <description>&lt;P&gt;Getting fairly good at this now, when I watch my syntax...magic ingredient is the following:&lt;/P&gt;

&lt;P&gt;REGEX=(?msi)^EventCode=4663.+?Process\sName:\s+(C:\Windows\servicing\TrustedInstaller.exe|proc 2|proc 3)&lt;BR /&gt;
DEST_KEY=queue&lt;BR /&gt;
FORMAT=nullQueue&lt;/P&gt;

&lt;P&gt;seems to work every time with this syntax....yay!!&lt;/P&gt;</description>
    <pubDate>Thu, 17 Oct 2013 15:18:24 GMT</pubDate>
    <dc:creator>gsawyer1</dc:creator>
    <dc:date>2013-10-17T15:18:24Z</dc:date>
    <item>
      <title>REGEX in transforms for windows path and EventCode</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REGEX-in-transforms-for-windows-path-and-EventCode/m-p/40480#M9326</link>
      <description>&lt;P&gt;Another awesome Regex question, related to windows.  I have a windows EventCode=4663.  The event contains a Process_Name field which Splunk extracts successfully on its own.&lt;BR /&gt;
I want to write a transform to send events that match this EventCode AND a three different possible Process_Names, to send them to the nullqueue. Yes, that's two criteria in a transform.&lt;/P&gt;

&lt;P&gt;Is this possible?  What's the correct syntax?&lt;BR /&gt;&lt;BR /&gt;
Using Perl Editors for Regex online, versus using the regex command or rex command in Splunkweb, versus trying a REGEX in transform - they all seem to be slightly different in the rules you have to follow....&lt;BR /&gt;
Here's an example of an eventcode 4663:&lt;/P&gt;

&lt;P&gt;Log Name:       Security&lt;/P&gt;

&lt;P&gt;Source:            Microsoft-Windows-Security-Auditing&lt;/P&gt;

&lt;P&gt;Date:              11/9/2011 5:12:18 AM&lt;/P&gt;

&lt;P&gt;Event ID:        4663&lt;/P&gt;

&lt;P&gt;Task Category: File System&lt;/P&gt;

&lt;P&gt;Level:              Information&lt;/P&gt;

&lt;P&gt;Keywords:       Audit Success&lt;/P&gt;

&lt;P&gt;User:               N/A&lt;/P&gt;

&lt;P&gt;Computer:       dcc1.Logistics.corp&lt;/P&gt;

&lt;P&gt;Description:&lt;BR /&gt;
An attempt was made to access an object.&lt;/P&gt;

&lt;P&gt;Subject:&lt;/P&gt;

&lt;P&gt;Security ID:        SYSTEM&lt;/P&gt;

&lt;P&gt;Account Name:   dcc1$&lt;/P&gt;

&lt;P&gt;Account Domain: LOGISTICS&lt;/P&gt;

&lt;P&gt;Logon ID:       0x3e7&lt;/P&gt;

&lt;P&gt;Object:&lt;/P&gt;

&lt;P&gt;Object Server:  Security&lt;/P&gt;

&lt;P&gt;Object Type:    File&lt;/P&gt;

&lt;P&gt;Object Name:&lt;BR /&gt;&lt;BR /&gt;
C:\Windows\servicing\Packages\Package_2_for_KB2620704~31bf3856ad364e35~x86~~6.0.1.0.mum&lt;/P&gt;

&lt;P&gt;Handle ID:                       0x530&lt;/P&gt;

&lt;P&gt;Process Information:&lt;/P&gt;

&lt;P&gt;Process ID:                      0xc0c&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Process Name:   C:\Windows\servicing\TrustedInstaller.exe
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Access Request Information:&lt;/P&gt;

&lt;P&gt;Accesses:                        WriteAttributes&lt;/P&gt;

&lt;P&gt;Access Mask:    0x100&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:50:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REGEX-in-transforms-for-windows-path-and-EventCode/m-p/40480#M9326</guid>
      <dc:creator>gsawyer1</dc:creator>
      <dc:date>2020-09-28T12:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX in transforms for windows path and EventCode</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REGEX-in-transforms-for-windows-path-and-EventCode/m-p/40481#M9327</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Can't test this out myself at the mo, but have done something similar in the past.&lt;/P&gt;

&lt;P&gt;Note, you have to escape the \'s and .'s in the process name, and proc 2 and proc 3 are the other processes you are trying to drop.&lt;/P&gt;

&lt;P&gt;Give this a try&lt;/P&gt;

&lt;P&gt;REGEX=(?msi)EventCode=4663.*Process\s+Name:\s+(C:\\Windows\\servicing\\TrustedInstaller\.exe|proc 2|proc 3)&lt;BR /&gt;&lt;BR /&gt;
DEST_KEY=queue&lt;BR /&gt;&lt;BR /&gt;
FORMAT=nullQueue&lt;/P&gt;</description>
      <pubDate>Tue, 20 Nov 2012 17:00:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REGEX-in-transforms-for-windows-path-and-EventCode/m-p/40481#M9327</guid>
      <dc:creator>JovanMilosevic</dc:creator>
      <dc:date>2012-11-20T17:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX in transforms for windows path and EventCode</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REGEX-in-transforms-for-windows-path-and-EventCode/m-p/40482#M9328</link>
      <description>&lt;P&gt;Getting fairly good at this now, when I watch my syntax...magic ingredient is the following:&lt;/P&gt;

&lt;P&gt;REGEX=(?msi)^EventCode=4663.+?Process\sName:\s+(C:\Windows\servicing\TrustedInstaller.exe|proc 2|proc 3)&lt;BR /&gt;
DEST_KEY=queue&lt;BR /&gt;
FORMAT=nullQueue&lt;/P&gt;

&lt;P&gt;seems to work every time with this syntax....yay!!&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2013 15:18:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REGEX-in-transforms-for-windows-path-and-EventCode/m-p/40482#M9328</guid>
      <dc:creator>gsawyer1</dc:creator>
      <dc:date>2013-10-17T15:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX in transforms for windows path and EventCode</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REGEX-in-transforms-for-windows-path-and-EventCode/m-p/40483#M9329</link>
      <description>&lt;P&gt;Splunk stripped out my backslashes before the s's in the above phrase....should occur after "process" and "Name:"....&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2013 15:19:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REGEX-in-transforms-for-windows-path-and-EventCode/m-p/40483#M9329</guid>
      <dc:creator>gsawyer1</dc:creator>
      <dc:date>2013-10-17T15:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX in transforms for windows path and EventCode</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REGEX-in-transforms-for-windows-path-and-EventCode/m-p/40484#M9330</link>
      <description>&lt;P&gt;UPDATE splunk 6.*&lt;BR /&gt;
Since this version you can actually specify a list or range of eventCodes to exclude at the forwarder level, in inputs.conf. It will reduce the volume at the forwarder level and reduce the network load.&lt;/P&gt;

&lt;P&gt;see &lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Admin/Inputsconf"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Admin/Inputsconf&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;example:&lt;/P&gt;

&lt;P&gt;[WinEventLog:Security]&lt;BR /&gt;
disabled = 0&lt;BR /&gt;
blacklist=566,800-850&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2013 23:33:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REGEX-in-transforms-for-windows-path-and-EventCode/m-p/40484#M9330</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2013-10-25T23:33:59Z</dc:date>
    </item>
  </channel>
</rss>

