<?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: Search for events in sequence over time in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-for-events-in-sequence-over-time/m-p/236897#M70395</link>
    <description>&lt;P&gt;A &lt;CODE&gt;stats&lt;/CODE&gt; search which replaces a &lt;CODE&gt;join&lt;/CODE&gt; is most likely to be the better approach &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 02 May 2016 22:10:11 GMT</pubDate>
    <dc:creator>MuS</dc:creator>
    <dc:date>2016-05-02T22:10:11Z</dc:date>
    <item>
      <title>Search for events in sequence over time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-events-in-sequence-over-time/m-p/236895#M70393</link>
      <description>&lt;P&gt;I am attempting to create a search to alert on when a previously disabled employee is re-enabled. Currently, my search is as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* EventCode=4738 sourcetype="WinEventLog:Security" New_UAC_Value="0x10" | join type=inner [search earliest=-3m@d latest=now index=* sourcetype="WinEventLog:Security" EventCode=4725] | table _time,user,src_user,Old_UAC_Value,New_UAC_Value,EventCode
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The first search identifies accounts that have been re-enabled. While this is half the battle, it also includes accounts that are being created or modified in some way. The second search (after the join) identifies disabled accounts. What I need to identify in my search are those accounts that in sometime in the past were disabled, and this more recently re-enabled.&lt;/P&gt;

&lt;P&gt;Joining these two searches in the manner above does not produce what I expect it to.&lt;/P&gt;

&lt;P&gt;I greatly appreciate any help provided.&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2016 19:48:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-events-in-sequence-over-time/m-p/236895#M70393</guid>
      <dc:creator>RunNateRun</dc:creator>
      <dc:date>2016-05-02T19:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: Search for events in sequence over time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-events-in-sequence-over-time/m-p/236896#M70394</link>
      <description>&lt;P&gt;How about something like this (this is untested code, so please edit as appropriate)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* sourcetype="WinEventLog:Security" EventCode=4738  OR EventCode=4725  | stats latest(eval(if(EventCode=4738 AND New_UAC_Value="0x10", _time, null()))) as E4738 latest(eval(if(EventCode=4725, _time, null()))) as E4725 by Account_Name | where E4738&amp;gt;E4725 | foreach E* [eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;=strftime(&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;, "%m/%d/%Y %H:%M:%S")]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You could also try with EventCode 4722 (account enabled)&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2016 21:39:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-events-in-sequence-over-time/m-p/236896#M70394</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-05-02T21:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: Search for events in sequence over time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-events-in-sequence-over-time/m-p/236897#M70395</link>
      <description>&lt;P&gt;A &lt;CODE&gt;stats&lt;/CODE&gt; search which replaces a &lt;CODE&gt;join&lt;/CODE&gt; is most likely to be the better approach &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2016 22:10:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-events-in-sequence-over-time/m-p/236897#M70395</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2016-05-02T22:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: Search for events in sequence over time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-events-in-sequence-over-time/m-p/236898#M70396</link>
      <description>&lt;P&gt;Modified this to capture removal from the security-enabled global group (Event code 4729) instead of  4725. Code worked perfectly. &lt;/P&gt;

&lt;P&gt;Thank you Sundareshr!&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2016 15:25:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-events-in-sequence-over-time/m-p/236898#M70396</guid>
      <dc:creator>RunNateRun</dc:creator>
      <dc:date>2016-05-03T15:25:01Z</dc:date>
    </item>
  </channel>
</rss>

