<?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 Show results only when EventCodes occur in a specific sequence in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Show-results-only-when-EventCodes-occur-in-a-specific-sequence/m-p/460046#M79418</link>
    <description>&lt;P&gt;I'm attempting to find events when EventCodes occur in 1, 3, 13, then 4689. (Detection of psexec via windows logs). Here is what I've come up with:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=windows (EventCode=1 OR EventCode=3 OR EventCode=13 OR EventCode=4689)
 | streamstats count(eval(EventCode="1" OR EventCode="3" OR EventCode="13" OR EventCode=4689)) AS sessionID BY host
 | transaction host startswith=1 endswith=4689
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The problem is the search takes forever to complete and either we don't have any psexec running in the environment or the search isn't correct. Can someone take a look at the logic to determine if I'm on the right path, if this returns any results, &amp;amp; if there is a better way to search for this? Thank you in advance!&lt;/P&gt;</description>
    <pubDate>Thu, 22 Aug 2019 21:22:50 GMT</pubDate>
    <dc:creator>wgawhh5hbnht</dc:creator>
    <dc:date>2019-08-22T21:22:50Z</dc:date>
    <item>
      <title>Show results only when EventCodes occur in a specific sequence</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Show-results-only-when-EventCodes-occur-in-a-specific-sequence/m-p/460046#M79418</link>
      <description>&lt;P&gt;I'm attempting to find events when EventCodes occur in 1, 3, 13, then 4689. (Detection of psexec via windows logs). Here is what I've come up with:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=windows (EventCode=1 OR EventCode=3 OR EventCode=13 OR EventCode=4689)
 | streamstats count(eval(EventCode="1" OR EventCode="3" OR EventCode="13" OR EventCode=4689)) AS sessionID BY host
 | transaction host startswith=1 endswith=4689
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The problem is the search takes forever to complete and either we don't have any psexec running in the environment or the search isn't correct. Can someone take a look at the logic to determine if I'm on the right path, if this returns any results, &amp;amp; if there is a better way to search for this? Thank you in advance!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2019 21:22:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Show-results-only-when-EventCodes-occur-in-a-specific-sequence/m-p/460046#M79418</guid>
      <dc:creator>wgawhh5hbnht</dc:creator>
      <dc:date>2019-08-22T21:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: Show results only when EventCodes occur in a specific sequence</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Show-results-only-when-EventCodes-occur-in-a-specific-sequence/m-p/460047#M79419</link>
      <description>&lt;P&gt;if you remove everything after the first pipe , is the search executing for just  index=windows (EventCode=1 OR EventCode=3 OR EventCode=13 OR EventCode=4689) ?&lt;BR /&gt;
if that is taking too long , can you try these 2 options?&lt;BR /&gt;
index=windows |fields EventCode|where (EventCode=1 OR EventCode=3 OR EventCode=13 OR EventCode=4689)&lt;BR /&gt;
OR&lt;BR /&gt;
index=windows EventCode=|where (EventCode=1 OR EventCode=3 OR EventCode=13 OR EventCode=4689)&lt;/P&gt;

&lt;P&gt;does it make a difference?&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 06:18:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Show-results-only-when-EventCodes-occur-in-a-specific-sequence/m-p/460047#M79419</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2019-08-23T06:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: Show results only when EventCodes occur in a specific sequence</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Show-results-only-when-EventCodes-occur-in-a-specific-sequence/m-p/460048#M79420</link>
      <description>&lt;P&gt;The portion that takes a long time is&lt;BR /&gt;
    | transaction host startswith=1 endswith=4689&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 13:18:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Show-results-only-when-EventCodes-occur-in-a-specific-sequence/m-p/460048#M79420</guid>
      <dc:creator>wgawhh5hbnht</dc:creator>
      <dc:date>2019-08-23T13:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: Show results only when EventCodes occur in a specific sequence</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Show-results-only-when-EventCodes-occur-in-a-specific-sequence/m-p/460049#M79421</link>
      <description>&lt;P&gt;hi @wgawhh5hbnht &lt;BR /&gt;
can you post a sample event? your command looks ok I am reasonably sure the event structure is different from what  I am visualising atm.&lt;BR /&gt;
PS - One tongue twister of a username &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;  &lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 18:51:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Show-results-only-when-EventCodes-occur-in-a-specific-sequence/m-p/460049#M79421</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2019-08-23T18:51:19Z</dc:date>
    </item>
  </channel>
</rss>

