<?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: Quick SPL help with Windows Logs! in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Quick-SPL-help-with-Windows-Logs/m-p/594354#M206863</link>
    <description>&lt;P&gt;Depending on the data using maxspan of 3 days for transaction is going to be difficult to diagnose. It will silently handle buffer/memory size issues, so you will rarely know if your results are reliable.&lt;/P&gt;&lt;P&gt;I would always starts with stats, e.g.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;search&amp;gt; EventCode=1000 OR EventCode=1001 OR EventCode=1002
| stats list(_time) as times list(EventCode) as Codes by ComputerName
| where mvcount(Codes)=1 AND mvindex(Codes,0)="1000"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Assuming the search is run from the Friday to some point later, then this would return you all ComputerName results where there is ONLY a single result for ComputerName and it is a 1000 EventCode&lt;/P&gt;&lt;P&gt;Effectively this gives you all the open scans currently in progress.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Apr 2022 03:14:30 GMT</pubDate>
    <dc:creator>bowesmana</dc:creator>
    <dc:date>2022-04-20T03:14:30Z</dc:date>
    <item>
      <title>Quick SPL help with Windows Logs!</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Quick-SPL-help-with-Windows-Logs/m-p/594251#M206827</link>
      <description>&lt;P&gt;Good day all,&lt;/P&gt;&lt;P&gt;I come to seek guidance from the experts &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;My team and I have been tasked with creating an alert that will capture hosts that start a Windows AV scan (EventCode=1000) on a Friday and don't complete by Monday. These long running scans are causing issues in the environment and we are hoping to tackle them before the start of business on Monday.&lt;/P&gt;&lt;P&gt;The hosts log EventCode=1001 OR EventCode=1002 when they have stopped their scan.&lt;/P&gt;&lt;P&gt;We have attempted to put together a couple queries, one using a subsearch that grabs all hosts who have logged EventCode=1000 that is piped into an outer search that does a NOT EventCode=1001 OR EventCode=1002 and the second using the transaction command with the following syntax:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;base search&amp;gt; | transaction maxspan=3d startswith=EventCode="1000" endswith=(EventCode="1001" OR EventCode="1002") keeporphans=true | where _txn_orphan=1
| stats count by ComputerName&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but get no results. I do know that the transaction command is a hog and is generally recommended against. I wanted to ask the collective any thoughts or ideas on this to see the best practice for this type of search. I have read a couple posts using streamstats but I'm not sure if this is the best route for this specific example here As always, it is greatly appreciated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 12:29:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Quick-SPL-help-with-Windows-Logs/m-p/594251#M206827</guid>
      <dc:creator>dfurtaw</dc:creator>
      <dc:date>2022-04-19T12:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: Quick SPL help with Windows Logs!</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Quick-SPL-help-with-Windows-Logs/m-p/594354#M206863</link>
      <description>&lt;P&gt;Depending on the data using maxspan of 3 days for transaction is going to be difficult to diagnose. It will silently handle buffer/memory size issues, so you will rarely know if your results are reliable.&lt;/P&gt;&lt;P&gt;I would always starts with stats, e.g.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;search&amp;gt; EventCode=1000 OR EventCode=1001 OR EventCode=1002
| stats list(_time) as times list(EventCode) as Codes by ComputerName
| where mvcount(Codes)=1 AND mvindex(Codes,0)="1000"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Assuming the search is run from the Friday to some point later, then this would return you all ComputerName results where there is ONLY a single result for ComputerName and it is a 1000 EventCode&lt;/P&gt;&lt;P&gt;Effectively this gives you all the open scans currently in progress.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 03:14:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Quick-SPL-help-with-Windows-Logs/m-p/594354#M206863</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-04-20T03:14:30Z</dc:date>
    </item>
  </channel>
</rss>

