<?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 oldest log indexed in the indexer instances ? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-oldest-log-indexed-in-the-indexer-instances/m-p/361358#M106728</link>
    <description>&lt;P&gt;Heh.  Yep, no query needed that way.  &lt;/P&gt;

&lt;P&gt;Please promote your comment to an answer and accept it so that people who find this question will know the easy way.  Also, please upvote somesoni2's useful and helpful answer as well.&lt;/P&gt;</description>
    <pubDate>Mon, 20 Mar 2017 16:22:15 GMT</pubDate>
    <dc:creator>DalJeanis</dc:creator>
    <dc:date>2017-03-20T16:22:15Z</dc:date>
    <item>
      <title>How to find the oldest log indexed in the indexer instances ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-oldest-log-indexed-in-the-indexer-instances/m-p/361353#M106723</link>
      <description>&lt;P&gt;Hi All, Currently we are running out of space in our indexer instance and we wanted to remove the oldest data that is in our indexer and stored more than 1 year from the indexer instances. When we tried the below search, to get the oldest data that got indexed in the indexer instances but it is taking too long time to get the result when time frame is set to &lt;STRONG&gt;ALL time&lt;/STRONG&gt; &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* | stats first(_time) as latest  last(_time) as earliest by index | convert timeformat="%Y-%m-%d %H:%M:%S" ctime(earliest) ctime(latest)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Kindly let me know if there is a better search, which can get the oldest data that are being indexed and stored in indexer instance more than a year. &lt;/P&gt;

&lt;P&gt;thanks in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2017 15:17:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-oldest-log-indexed-in-the-indexer-instances/m-p/361353#M106723</guid>
      <dc:creator>Hemnaath</dc:creator>
      <dc:date>2017-03-20T15:17:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the oldest log indexed in the indexer instances ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-oldest-log-indexed-in-the-indexer-instances/m-p/361354#M106724</link>
      <description>&lt;P&gt;Use tstats instead.&lt;BR /&gt;
&lt;STRONG&gt;Updated&lt;/STRONG&gt; &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats min(_time) as latest max(_time) as earliest WHERE index=* by index | convert timeformat="%Y-%m-%d %H:%M:%S" ctime(earliest) ctime(latest)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 Mar 2017 15:20:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-oldest-log-indexed-in-the-indexer-instances/m-p/361354#M106724</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-03-20T15:20:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the oldest log indexed in the indexer instances ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-oldest-log-indexed-in-the-indexer-instances/m-p/361355#M106725</link>
      <description>&lt;P&gt;Hi Somesoni2, I am getting an error while executing the above mentioned query &lt;/P&gt;

&lt;P&gt;error details : Error in 'TsidxStats': _time aggregations are not yet supported except for min/max&lt;/P&gt;

&lt;P&gt;we are using the splunk 6.0.3 version &lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2017 15:29:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-oldest-log-indexed-in-the-indexer-instances/m-p/361355#M106725</guid>
      <dc:creator>Hemnaath</dc:creator>
      <dc:date>2017-03-20T15:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the oldest log indexed in the indexer instances ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-oldest-log-indexed-in-the-indexer-instances/m-p/361356#M106726</link>
      <description>&lt;P&gt;Try the updated answer.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2017 15:33:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-oldest-log-indexed-in-the-indexer-instances/m-p/361356#M106726</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-03-20T15:33:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the oldest log indexed in the indexer instances ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-oldest-log-indexed-in-the-indexer-instances/m-p/361357#M106727</link>
      <description>&lt;P&gt;Thanks Somesoni2,  we could run the update query in the splunk indexer instance web portal. But we &lt;BR /&gt;
had another method to find out the oldest indexed data that is still in the indexer instance from &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;splunk web portal -- &amp;gt; settings --&amp;gt; data inputs --&amp;gt; indexes --&amp;gt; index name --&amp;gt; Earliest event and Latest event&lt;/STRONG&gt;  will tell you the oldest data and latest data that are their in the index instance. &lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2017 16:11:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-oldest-log-indexed-in-the-indexer-instances/m-p/361357#M106727</guid>
      <dc:creator>Hemnaath</dc:creator>
      <dc:date>2017-03-20T16:11:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the oldest log indexed in the indexer instances ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-oldest-log-indexed-in-the-indexer-instances/m-p/361358#M106728</link>
      <description>&lt;P&gt;Heh.  Yep, no query needed that way.  &lt;/P&gt;

&lt;P&gt;Please promote your comment to an answer and accept it so that people who find this question will know the easy way.  Also, please upvote somesoni2's useful and helpful answer as well.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2017 16:22:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-oldest-log-indexed-in-the-indexer-instances/m-p/361358#M106728</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-03-20T16:22:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the oldest log indexed in the indexer instances ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-oldest-log-indexed-in-the-indexer-instances/m-p/361359#M106729</link>
      <description>&lt;P&gt;I am taking you literally that you need it broken down for ALL data BY EACH indexER:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | tstats min(_time) as latest max(_time) AS earliest WHERE index=* OR index=_* BY index splunk_server | convert timeformat="%Y-%m-%d %H:%M:%S" ctime(earliest) ctime(latest)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You probably don't need to include the &lt;CODE&gt;_*&lt;/CODE&gt; indices so then this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | tstats min(_time) as latest max(_time) AS earliest WHERE index=* BY index splunk_server | convert timeformat="%Y-%m-%d %H:%M:%S" ctime(earliest) ctime(latest)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you don't need it broken down by each indexer then:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | tstats min(_time) as latest max(_time) AS earliest WHERE index=* BY index | convert timeformat="%Y-%m-%d %H:%M:%S" ctime(earliest) ctime(latest)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 Mar 2017 16:28:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-oldest-log-indexed-in-the-indexer-instances/m-p/361359#M106729</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-03-20T16:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the oldest log indexed in the indexer instances ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-oldest-log-indexed-in-the-indexer-instances/m-p/361360#M106730</link>
      <description>&lt;P&gt;For a particular host:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats min(_time) as earliest max(_time) as latest WHERE index=winevent_dc_index host=HIT-DC03.hsg.wangotango.edu by host
| convert timeformat="%Y-%m-%d %H:%M:%S" ctime(earliest) ctime(latest)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Where 'winevent_dc_index' is the index you intend (or use * for all non-internal) and 'HIT-DC03.hsg.wangotango.edu' is the hostname you are looking for. Use "All Time" on the time-picker.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:31:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-oldest-log-indexed-in-the-indexer-instances/m-p/361360#M106730</guid>
      <dc:creator>wrangler2x</dc:creator>
      <dc:date>2020-09-29T17:31:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the oldest log indexed in the indexer instances ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-oldest-log-indexed-in-the-indexer-instances/m-p/361361#M106731</link>
      <description>&lt;P&gt;On later system its:&lt;BR /&gt;
&lt;STRONG&gt;splunk web portal -&amp;gt; setttings -&amp;gt; indexes&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;But if you are on a search head with indexes stored on other server (index server) you will not see any data there.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2019 06:48:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-oldest-log-indexed-in-the-indexer-instances/m-p/361361#M106731</guid>
      <dc:creator>lakromani</dc:creator>
      <dc:date>2019-09-05T06:48:11Z</dc:date>
    </item>
  </channel>
</rss>

