<?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: Latest + add 1 hour in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Latest-add-1-hour/m-p/45207#M10706</link>
    <description>&lt;P&gt;I tried for a similar problem and it worked!&lt;BR /&gt;
Great!&lt;/P&gt;

&lt;P&gt;Marco&lt;/P&gt;</description>
    <pubDate>Thu, 15 May 2014 16:55:26 GMT</pubDate>
    <dc:creator>marcoscala</dc:creator>
    <dc:date>2014-05-15T16:55:26Z</dc:date>
    <item>
      <title>Latest + add 1 hour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Latest-add-1-hour/m-p/45196#M10695</link>
      <description>&lt;P&gt;Hello splunk users,&lt;/P&gt;

&lt;P&gt;I have a search string with earliest defined and i want to define latest as "latest=earliest+1H". But how can i do that?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2011 10:05:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Latest-add-1-hour/m-p/45196#M10695</guid>
      <dc:creator>Eogs</dc:creator>
      <dc:date>2011-07-19T10:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: Latest + add 1 hour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Latest-add-1-hour/m-p/45197#M10696</link>
      <description>&lt;P&gt;Assuming your earliest timeis a relative earliest easiest would be to say something like&lt;/P&gt;

&lt;P&gt;earliest=-2h&lt;/P&gt;

&lt;P&gt;latest=-1h&lt;/P&gt;

&lt;P&gt;That would grab events from 2 hours ago to 1 hour ago.&lt;/P&gt;

&lt;P&gt;hope that helps&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2011 10:17:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Latest-add-1-hour/m-p/45197#M10696</guid>
      <dc:creator>kenchisho</dc:creator>
      <dc:date>2011-07-19T10:17:16Z</dc:date>
    </item>
    <item>
      <title>Re: Latest + add 1 hour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Latest-add-1-hour/m-p/45198#M10697</link>
      <description>&lt;P&gt;Yeah, but my earliest could be something like earliest="07/18/2011:09:00:00" and then latest should be latest="07/18/2011:10:00:00". But i don´t want latest to be static, i want it to be defined from earliest time. Is that posible? maybe i can use eval or strptime?    &lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2011 11:22:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Latest-add-1-hour/m-p/45198#M10697</guid>
      <dc:creator>Eogs</dc:creator>
      <dc:date>2011-07-19T11:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: Latest + add 1 hour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Latest-add-1-hour/m-p/45199#M10698</link>
      <description>&lt;P&gt;under the search option you have &lt;A href="http://www.splunk.com/base/Documentation/4.1.5/SearchReference/Search#Time_options"&gt;earlist and latest&lt;/A&gt; time&lt;/P&gt;

&lt;P&gt;you can "&lt;A href="http://www.splunk.com/base/Documentation/4.1.5/User/ChangeTheTimeRangeOfYourSearch#Examples_of_chained_relative_time"&gt;chain&lt;/A&gt;" times&lt;/P&gt;

&lt;P&gt;I am not sure how you are specifing your start time, but the end time would be (&amp;lt;starttime&amp;gt;+h)&lt;/P&gt;

&lt;P&gt;probably not the answer you are looking for, but I am hoping it is a baby step.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2011 18:38:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Latest-add-1-hour/m-p/45199#M10698</guid>
      <dc:creator>fk319</dc:creator>
      <dc:date>2011-07-19T18:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: Latest + add 1 hour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Latest-add-1-hour/m-p/45200#M10699</link>
      <description>&lt;P&gt;But when i write my searchstring is it possible to write something like index="summary" earliest="07/18/2011:09:00:00" latest=startime+1h ???&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2011 19:15:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Latest-add-1-hour/m-p/45200#M10699</guid>
      <dc:creator>Eogs</dc:creator>
      <dc:date>2011-07-19T19:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: Latest + add 1 hour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Latest-add-1-hour/m-p/45201#M10700</link>
      <description>&lt;P&gt;This is not pretty at all, but does seem to work.  I'll be honest, I only marginally understand how it does work.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[ search earliest=-2h@h 
| addinfo 
| head 1 
| eval earliest=info_min_time
| eval latest=info_min_time+3600
| fields earliest,latest 
| format "(" "(" "" ")" "OR" ")" ] 
the rest of your search
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The subsearch (basically, if I understand it right) recomputes &lt;CODE&gt;earliest&lt;/CODE&gt; and &lt;CODE&gt;latest&lt;/CODE&gt; for the outer search based on the &lt;CODE&gt;info_min_time&lt;/CODE&gt; provided by &lt;CODE&gt;addinfo&lt;/CODE&gt; in the outer search.&lt;/P&gt;

&lt;P&gt;This is quite admittedly an ugly, hackish solution.  I hope that someone can provide a more elegant one.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2011 01:52:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Latest-add-1-hour/m-p/45201#M10700</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2011-07-20T01:52:14Z</dc:date>
    </item>
    <item>
      <title>Re: Latest + add 1 hour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Latest-add-1-hour/m-p/45202#M10701</link>
      <description>&lt;P&gt;How are you getting the "earliest" time set?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2011 05:00:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Latest-add-1-hour/m-p/45202#M10701</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2011-07-20T05:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: Latest + add 1 hour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Latest-add-1-hour/m-p/45203#M10702</link>
      <description>&lt;P&gt;You don't need the strftime() function, just &lt;CODE&gt;eval earliest=info_min_time&lt;/CODE&gt; and &lt;CODE&gt;eval earliest=info_min_time+3600&lt;/CODE&gt; will be fine. The &lt;CODE&gt;format&lt;/CODE&gt; command is fine, but it would be more generally accurate to use &lt;CODE&gt;format "(" "(" "" ")" "OR" ")"&lt;/CODE&gt; instead.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2011 05:03:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Latest-add-1-hour/m-p/45203#M10702</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2011-07-20T05:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: Latest + add 1 hour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Latest-add-1-hour/m-p/45204#M10703</link>
      <description>&lt;P&gt;So earliest and latest understand time_t directly?  Did not get that from the docs (but did not try it).  Sweet!&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2011 14:24:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Latest-add-1-hour/m-p/45204#M10703</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2011-07-20T14:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: Latest + add 1 hour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Latest-add-1-hour/m-p/45205#M10704</link>
      <description>&lt;P&gt;Refer to example 2 of chain&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2011 14:31:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Latest-add-1-hour/m-p/45205#M10704</guid>
      <dc:creator>fk319</dc:creator>
      <dc:date>2011-07-20T14:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: Latest + add 1 hour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Latest-add-1-hour/m-p/45206#M10705</link>
      <description>&lt;P&gt;you also have the option of "searchtimespanminutes"&lt;/P&gt;

&lt;P&gt;&lt;A href="http://www.splunk.com/base/Documentation/4.1.5/SearchReference/SearchTimeModifiers#List_of_time_modifiers"&gt;http://www.splunk.com/base/Documentation/4.1.5/SearchReference/SearchTimeModifiers#List_of_time_modifiers&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2011 14:47:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Latest-add-1-hour/m-p/45206#M10705</guid>
      <dc:creator>fk319</dc:creator>
      <dc:date>2011-07-20T14:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: Latest + add 1 hour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Latest-add-1-hour/m-p/45207#M10706</link>
      <description>&lt;P&gt;I tried for a similar problem and it worked!&lt;BR /&gt;
Great!&lt;/P&gt;

&lt;P&gt;Marco&lt;/P&gt;</description>
      <pubDate>Thu, 15 May 2014 16:55:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Latest-add-1-hour/m-p/45207#M10706</guid>
      <dc:creator>marcoscala</dc:creator>
      <dc:date>2014-05-15T16:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: Latest + add 1 hour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Latest-add-1-hour/m-p/45208#M10707</link>
      <description>&lt;P&gt;I had the same question and searchtimespanminutes worked for me. It's concise and easy to use. I wish this was an answer I could upvote!&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2015 20:57:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Latest-add-1-hour/m-p/45208#M10707</guid>
      <dc:creator>Splunkster45</dc:creator>
      <dc:date>2015-04-27T20:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: Latest + add 1 hour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Latest-add-1-hour/m-p/45209#M10708</link>
      <description>&lt;P&gt;This is so awesome. Worked perfectly. &lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2016 00:38:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Latest-add-1-hour/m-p/45209#M10708</guid>
      <dc:creator>sk314</dc:creator>
      <dc:date>2016-05-12T00:38:36Z</dc:date>
    </item>
  </channel>
</rss>

