<?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: how to find the earliest and latest event in an index? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-find-the-earliest-and-latest-event-in-an-index/m-p/61694#M15221</link>
    <description>&lt;P&gt;_indextime is always the time when the event has been index. _time can be a different time, for example when the time found within an event is used&lt;/P&gt;</description>
    <pubDate>Fri, 01 Oct 2010 02:42:13 GMT</pubDate>
    <dc:creator>ziegfried</dc:creator>
    <dc:date>2010-10-01T02:42:13Z</dc:date>
    <item>
      <title>how to find the earliest and latest event in an index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-find-the-earliest-and-latest-event-in-an-index/m-p/61690#M15217</link>
      <description>&lt;P&gt;I simply looking for the fist event in an index and the last... to determine how long it took to index  x data.&lt;/P&gt;

&lt;P&gt;any suggestions?  i couldn't seem to figure out that query.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Oct 2010 02:21:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-find-the-earliest-and-latest-event-in-an-index/m-p/61690#M15217</guid>
      <dc:creator>hiddenkirby</dc:creator>
      <dc:date>2010-10-01T02:21:35Z</dc:date>
    </item>
    <item>
      <title>Re: how to find the earliest and latest event in an index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-find-the-earliest-and-latest-event-in-an-index/m-p/61691#M15218</link>
      <description>&lt;P&gt;You can look at the index event times using something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| metadata index=main type=hosts | stats min(firstTime) max(lastTime)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or, to examine individual events, you can compare the &lt;CODE&gt;_time&lt;/CODE&gt; and &lt;CODE&gt;_indextime&lt;/CODE&gt; fields:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=main | eval lag=_indextime-_time | stats avg(lag) ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Do either of these help?&lt;/P&gt;</description>
      <pubDate>Fri, 01 Oct 2010 02:25:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-find-the-earliest-and-latest-event-in-an-index/m-p/61691#M15218</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2010-10-01T02:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: how to find the earliest and latest event in an index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-find-the-earliest-and-latest-event-in-an-index/m-p/61692#M15219</link>
      <description>&lt;P&gt;Do you mean the time when the event has been indexed? Then the query would be:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=&amp;lt;your_index&amp;gt; | stats min(_indextime) as min_indextime max(_indextime) as max_indextime | convert ctime(min_indextime) ctime(max_indextime)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 01 Oct 2010 02:25:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-find-the-earliest-and-latest-event-in-an-index/m-p/61692#M15219</guid>
      <dc:creator>ziegfried</dc:creator>
      <dc:date>2010-10-01T02:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: how to find the earliest and latest event in an index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-find-the-earliest-and-latest-event-in-an-index/m-p/61693#M15220</link>
      <description>&lt;P&gt;whats the difference between _indextime and _time?&lt;/P&gt;</description>
      <pubDate>Fri, 01 Oct 2010 02:40:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-find-the-earliest-and-latest-event-in-an-index/m-p/61693#M15220</guid>
      <dc:creator>hiddenkirby</dc:creator>
      <dc:date>2010-10-01T02:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: how to find the earliest and latest event in an index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-find-the-earliest-and-latest-event-in-an-index/m-p/61694#M15221</link>
      <description>&lt;P&gt;_indextime is always the time when the event has been index. _time can be a different time, for example when the time found within an event is used&lt;/P&gt;</description>
      <pubDate>Fri, 01 Oct 2010 02:42:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-find-the-earliest-and-latest-event-in-an-index/m-p/61694#M15221</guid>
      <dc:creator>ziegfried</dc:creator>
      <dc:date>2010-10-01T02:42:13Z</dc:date>
    </item>
    <item>
      <title>Re: how to find the earliest and latest event in an index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-find-the-earliest-and-latest-event-in-an-index/m-p/61695#M15222</link>
      <description>&lt;P&gt;_time and _indextime are only equal when you use DATETIME_CONFIG = current in your props config of if no timestamp was detected in the event.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:18:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-find-the-earliest-and-latest-event-in-an-index/m-p/61695#M15222</guid>
      <dc:creator>ziegfried</dc:creator>
      <dc:date>2020-09-28T09:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: how to find the earliest and latest event in an index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-find-the-earliest-and-latest-event-in-an-index/m-p/61696#M15223</link>
      <description>&lt;P&gt;This was helpful.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Oct 2010 02:48:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-find-the-earliest-and-latest-event-in-an-index/m-p/61696#M15223</guid>
      <dc:creator>hiddenkirby</dc:creator>
      <dc:date>2010-10-01T02:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: how to find the earliest and latest event in an index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-find-the-earliest-and-latest-event-in-an-index/m-p/61697#M15224</link>
      <description>&lt;P&gt;i ended up w/ max(_time) and min(_time)  .. convert was very helpful.  thank you both.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:18:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-find-the-earliest-and-latest-event-in-an-index/m-p/61697#M15224</guid>
      <dc:creator>hiddenkirby</dc:creator>
      <dc:date>2020-09-28T09:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: how to find the earliest and latest event in an index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-find-the-earliest-and-latest-event-in-an-index/m-p/61698#M15225</link>
      <description>&lt;P&gt;i do have DATATIME_CONFIG = current.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Oct 2010 02:49:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-find-the-earliest-and-latest-event-in-an-index/m-p/61698#M15225</guid>
      <dc:creator>hiddenkirby</dc:creator>
      <dc:date>2010-10-01T02:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: how to find the earliest and latest event in an index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-find-the-earliest-and-latest-event-in-an-index/m-p/61699#M15226</link>
      <description>&lt;P&gt;look at &lt;BR /&gt;
Settings &amp;gt; DATA &amp;gt; Indexes    menu.&lt;BR /&gt;
There are earliest and last event time by Index.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jan 2015 08:36:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-find-the-earliest-and-latest-event-in-an-index/m-p/61699#M15226</guid>
      <dc:creator>joy76</dc:creator>
      <dc:date>2015-01-21T08:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: how to find the earliest and latest event in an index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-find-the-earliest-and-latest-event-in-an-index/m-p/61700#M15227</link>
      <description>&lt;P&gt;Hi Lowell,&lt;/P&gt;

&lt;P&gt;When I try this command, | metadata index=main type=hosts | stats min(firstTime) max(lastTime), all I get is two columns, min(firstTime) max(lastTime) with time in seconds. &lt;/P&gt;

&lt;P&gt;Can you please advise where I am getting it wrong ?&lt;BR /&gt;
Thanks.&lt;BR /&gt;
Dev&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2017 00:07:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-find-the-earliest-and-latest-event-in-an-index/m-p/61700#M15227</guid>
      <dc:creator>damode</dc:creator>
      <dc:date>2017-11-16T00:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: how to find the earliest and latest event in an index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-find-the-earliest-and-latest-event-in-an-index/m-p/61701#M15228</link>
      <description>&lt;P&gt;Try this&lt;BR /&gt;
    | metadata index=main type=hosts | stats min(firstTime) max(lastTime) by host&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2019 21:28:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-find-the-earliest-and-latest-event-in-an-index/m-p/61701#M15228</guid>
      <dc:creator>khourihan_splun</dc:creator>
      <dc:date>2019-05-03T21:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: how to find the earliest and latest event in an index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-find-the-earliest-and-latest-event-in-an-index/m-p/539317#M152537</link>
      <description>&lt;P&gt;I know thats an old post but i wanted to share a way more efficient solution to get latest timestamp by each index in a "metadata" manor:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rest /services/data/indexes
| stats max(maxTime) by title&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hop that helps others-&lt;/P&gt;&lt;P&gt;Cheers&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 16:13:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-find-the-earliest-and-latest-event-in-an-index/m-p/539317#M152537</guid>
      <dc:creator>claudio_manig</dc:creator>
      <dc:date>2021-02-10T16:13:23Z</dc:date>
    </item>
  </channel>
</rss>

