<?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: How to filter Windows Events from one host using Regex? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-Windows-Events-from-one-host-using-Regex/m-p/288350#M87293</link>
    <description>&lt;P&gt;Sorry there were two errors!&lt;BR /&gt;
try with&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?ms).*EventCode\=(4624|4672|4634).*Security\sID:\sS-1-5-21-34345566-23432455-2001\s+Account Name:\s_svc_abd
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;you can test it at &lt;A href="https://regex101.com/r/03QkUy/1"&gt;https://regex101.com/r/03QkUy/1&lt;/A&gt;&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
    <pubDate>Mon, 28 Aug 2017 17:02:54 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2017-08-28T17:02:54Z</dc:date>
    <item>
      <title>How to filter Windows Events from one host using Regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-Windows-Events-from-one-host-using-Regex/m-p/288347#M87290</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;How to filter out the events with EventCodes (4624, 4672, 4634) and Account _svc_abd with Security Id "S-1-5-21-34345566-23432455-2001"?&lt;/P&gt;

&lt;P&gt;LogName=Security&lt;BR /&gt;
SourceName=Microsoft Windows security auditing.&lt;BR /&gt;
EventCode=4624&lt;BR /&gt;
EventType=0&lt;BR /&gt;
Type=Information&lt;BR /&gt;
ComputerName=abc.ttt.com&lt;BR /&gt;
TaskCategory=Logon&lt;BR /&gt;
OpCode=Info&lt;BR /&gt;
RecordNumber=3434545&lt;BR /&gt;
Keywords=Audit Success&lt;BR /&gt;
Message=An account was successfully logged on.&lt;/P&gt;

&lt;P&gt;Subject:&lt;BR /&gt;
    Security ID:        S-1-0-0&lt;BR /&gt;
    Account Name:&lt;BR /&gt;
    Account Domain:&lt;BR /&gt;
    Logon ID:&lt;/P&gt;

&lt;P&gt;Logon Type:         3&lt;/P&gt;

&lt;P&gt;Impersonation Level:        Impersonation&lt;/P&gt;

&lt;P&gt;New Logon:&lt;BR /&gt;
    Security ID:        S-1-5-21-34345566-23432455-2001&lt;BR /&gt;
    Account Name:       _svc_abd &lt;BR /&gt;
    Account Domain:     ttt&lt;BR /&gt;
    Logon ID:       0x4E41454&lt;BR /&gt;
    Logon GUID:     {00000000-0000-0000-0000-000000000000}&lt;/P&gt;

&lt;P&gt;Process Information:&lt;BR /&gt;
    Process ID:&lt;BR /&gt;
    Process Name:&lt;BR /&gt;
Network Information:&lt;BR /&gt;
    Workstation Name:&lt;BR /&gt;
    Source Network Address:&lt;BR /&gt;
    Source Port:&lt;BR /&gt;
Detailed Authentication Information:&lt;BR /&gt;
    Logon Process:      NtLmSsp &lt;BR /&gt;
    Authentication Package: NTLM&lt;BR /&gt;
    Transited Services:&lt;BR /&gt;
    Package Name (NTLM only):   NTLM V2&lt;BR /&gt;
    Key Length:     0&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:25:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-Windows-Events-from-one-host-using-Regex/m-p/288347#M87290</guid>
      <dc:creator>kiran331</dc:creator>
      <dc:date>2020-09-29T15:25:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter Windows Events from one host using Regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-Windows-Events-from-one-host-using-Regex/m-p/288348#M87291</link>
      <description>&lt;P&gt;Hi  kiran331,&lt;BR /&gt;
if you want to search out events with your conditions at search time, you have to use the rex command with the following regex&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex "(?ms)EventCodes\=(4624|4672|4634).*Security\sID:\s-1-5-21-34345566-23432455-2001\s+Account Name:\s_svc_abd"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If instead you want to filter events before indexing (see &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Forwarding/Routeandfilterdatad"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Forwarding/Routeandfilterdatad&lt;/A&gt; ) you have to insert in &lt;BR /&gt;
&lt;STRONG&gt;props.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[WinEventLogs:Security]
TRANSFORMS-set= setparsing,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 = (?ms)EventCodes\=(4624|4672|4634).*Security\sID:\s-1-5-21-34345566-23432455-2001\s+Account Name:\s_svc_abd
DEST_KEY = queue
FORMAT = nullQueue

[setparsing]
REGEX = .
DEST_KEY = queue
FORMAT = indexQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2017 08:30:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-Windows-Events-from-one-host-using-Regex/m-p/288348#M87291</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-08-24T08:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter Windows Events from one host using Regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-Windows-Events-from-one-host-using-Regex/m-p/288349#M87292</link>
      <description>&lt;P&gt;Thanks Giuseppe, but unfortunately its not working, I also tried rex in search, its same.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2017 15:36:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-Windows-Events-from-one-host-using-Regex/m-p/288349#M87292</guid>
      <dc:creator>kiran331</dc:creator>
      <dc:date>2017-08-28T15:36:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter Windows Events from one host using Regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-Windows-Events-from-one-host-using-Regex/m-p/288350#M87293</link>
      <description>&lt;P&gt;Sorry there were two errors!&lt;BR /&gt;
try with&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?ms).*EventCode\=(4624|4672|4634).*Security\sID:\sS-1-5-21-34345566-23432455-2001\s+Account Name:\s_svc_abd
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;you can test it at &lt;A href="https://regex101.com/r/03QkUy/1"&gt;https://regex101.com/r/03QkUy/1&lt;/A&gt;&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2017 17:02:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-Windows-Events-from-one-host-using-Regex/m-p/288350#M87293</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-08-28T17:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter Windows Events from one host using Regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-Windows-Events-from-one-host-using-Regex/m-p/288351#M87294</link>
      <description>&lt;P&gt;Giuseppe,&lt;/P&gt;

&lt;P&gt;I'm getting this error&lt;/P&gt;

&lt;P&gt;Error in 'rex' command: The regex '(?ms).*EventCode=(4624|4672|4634).*Security\sID:\sS-1-5-21-34345566-23432455-2001\s+Account Name:\s_svc_abd' does not extract anything. It should specify at least one named group. Format: (?...).&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:33:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-Windows-Events-from-one-host-using-Regex/m-p/288351#M87294</guid>
      <dc:creator>kiran331</dc:creator>
      <dc:date>2020-09-29T15:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter Windows Events from one host using Regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-Windows-Events-from-one-host-using-Regex/m-p/288352#M87295</link>
      <description>&lt;P&gt;This regex is a filter to use in regex Command or in trnsforms.conf, not in rex command.&lt;BR /&gt;
Rex command is used to extract fields.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe &lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2017 18:00:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-Windows-Events-from-one-host-using-Regex/m-p/288352#M87295</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-08-28T18:00:46Z</dc:date>
    </item>
  </channel>
</rss>

