<?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: Time Range Question in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Time-Range-Question/m-p/603157#M209908</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/237518"&gt;@zacksoft_wf&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;as I said, lastTime is the max of _time, so taking 7 days as time range you cannot match the condition, try to take a period larger than 90 days and see if you have results&lt;/P&gt;&lt;P&gt;In addition there are macros, so it isn't so easy to read.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Fri, 24 Jun 2022 12:48:12 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2022-06-24T12:48:12Z</dc:date>
    <item>
      <title>Time Range Question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Time-Range-Question/m-p/603152#M209904</link>
      <description>&lt;P&gt;I have doubts that this Saved Search may not be properly engineered&amp;nbsp; and very taxing in terms of how time range is specified.&lt;BR /&gt;&lt;BR /&gt;This Saved search is basically responsible for populating a lookup.&amp;nbsp;&lt;BR /&gt;It ends with | outputlookup &amp;lt;lookup name&amp;gt;&lt;BR /&gt;The range of the scheduled saved search is defined as,&lt;BR /&gt;&amp;nbsp;earliest =&lt;STRONG&gt; -7d@h&lt;/STRONG&gt;&lt;BR /&gt;latest = now&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;In the saved search there is a logic added before the last time, that filters the event based on last 90 days.&lt;BR /&gt;The search ends Like this,&lt;BR /&gt;..........&lt;BR /&gt;..........&lt;BR /&gt;...........&lt;BR /&gt;| stats&lt;BR /&gt;min(firstTime) as firstTime&lt;BR /&gt;, max(lastTime) as lastTime&lt;BR /&gt;by&lt;BR /&gt;dest&lt;BR /&gt;, process&lt;BR /&gt;, process_path&lt;BR /&gt;, SHA256_Hash&lt;BR /&gt;, sourcetype&lt;BR /&gt;| where&lt;BR /&gt;lastTime &amp;gt; relative_time(now(), &lt;STRONG&gt;"-90d")&lt;/STRONG&gt;&lt;BR /&gt;| outputlookup LookUpName&lt;BR /&gt;&lt;BR /&gt;==================================&lt;BR /&gt;My Question is, How would the search behave? Would its scan range cover last 90 days or will limit itself to 7 days. Which time range will take precedence ?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2022 11:29:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Time-Range-Question/m-p/603152#M209904</guid>
      <dc:creator>zacksoft_wf</dc:creator>
      <dc:date>2022-06-24T11:29:59Z</dc:date>
    </item>
    <item>
      <title>Re: Time Range Question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Time-Range-Question/m-p/603153#M209905</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/237518"&gt;@zacksoft_wf&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Unless you configure the time limits in the main search with earliest and latest, the timeframe is as defined.&lt;BR /&gt;In your case it is 7 days, so the 90 days check is useless.&lt;/P&gt;&lt;P&gt;Only one question: I suppose that "&lt;SPAN&gt;lastTime" is a field in your lookup, could it have values greather 7 days or is it&amp;nbsp; calculated by _time?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;It might be different if you used a timed lookup and used the append = true option because in that case you could have values greater than 90 days.&lt;/P&gt;&lt;P&gt;I suggest you review your search design.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2022 11:47:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Time-Range-Question/m-p/603153#M209905</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-06-24T11:47:33Z</dc:date>
    </item>
    <item>
      <title>Re: Time Range Question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Time-Range-Question/m-p/603155#M209906</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp; &amp;nbsp;I fetch the process and time info&amp;nbsp; from the Endpoint Datamodel. And it could have value greater than 7d.&lt;BR /&gt;This is the SPL. (Trying to find out anomalous process)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats `summariesonly` 
    count min(_time) as firstTime
    , max(_time) as lastTime
    from 
    datamodel=Endpoint.Processes
    where
    nodename=Processes
   
    NOT ( 
    [| inputlookup myLookUp_7d 
    | table SHA256_Hash 
    | rename SHA256_Hash AS Processes.SHA256_Hash]
    )
    by 
    Processes.dest 
    , Processes.process 
    , Processes.process_path 
    , Processes.SHA256_Hash 
    , sourcetype 
| `drop_dm_object_name("Processes")` 
| eval 
    process_path=if(isnull(process_path),"?",process_path) 
| inputlookup append=T myLookUp_1d
| stats 
    min(firstTime) as firstTime
    , max(lastTime) as lastTime 
    by 
    dest
    , process
    , process_path
    , SHA256_Hash 
    , sourcetype
| where 
    lastTime &amp;gt; relative_time(now(), "-90d") 
| Outputlookup myLookUp_1d&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Will this search scan for 90 days then ?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2022 12:13:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Time-Range-Question/m-p/603155#M209906</guid>
      <dc:creator>zacksoft_wf</dc:creator>
      <dc:date>2022-06-24T12:13:26Z</dc:date>
    </item>
    <item>
      <title>Re: Time Range Question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Time-Range-Question/m-p/603157#M209908</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/237518"&gt;@zacksoft_wf&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;as I said, lastTime is the max of _time, so taking 7 days as time range you cannot match the condition, try to take a period larger than 90 days and see if you have results&lt;/P&gt;&lt;P&gt;In addition there are macros, so it isn't so easy to read.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2022 12:48:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Time-Range-Question/m-p/603157#M209908</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-06-24T12:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: Time Range Question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Time-Range-Question/m-p/603161#M209911</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/237518"&gt;@zacksoft_wf&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;good for you, see next time!&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2022 13:07:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Time-Range-Question/m-p/603161#M209911</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-06-24T13:07:45Z</dc:date>
    </item>
  </channel>
</rss>

