<?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 search and table the retention time of each hot, warm, cold, and frozen bucket by each index? in Deployment Architecture</title>
    <link>https://community.splunk.com/t5/Deployment-Architecture/How-to-search-and-table-the-retention-time-of-each-hot-warm-cold/m-p/235395#M8834</link>
    <description>&lt;P&gt;Hmm, try this for indexes:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rest /services/admin/indexes | eval yr = floor(frozenTimePeriodInSecs/86400/365)| eval dy = (frozenTimePeriodInSecs/86400) % 365 | eval ret = yr . " years, " . dy . " days" | stats list(splunk_server) list(frozenTimePeriodInSecs) list(ret) by title  
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And this for buckets:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| dbinspect index=* | join index [|rest /services/data/indexes| eval index=title | table index frozenTimePeriodInSecs ] | eval toNow=now()-endEpoch | convert num(toNow) | convert num(frozenTimePeriodInSecs) | convert ctime(endEpoch) AS endEvent | convert ctime(startEpoch) AS startEvent | eval shouldBeFrozen=if( ( state!="hot" AND state!="thawed" ) AND toNow&amp;gt;frozenTimePeriodInSecs,"yes","no") | table index path id state startEvent endEvent shouldBeFrozen toNow frozenTimePeriodInSecs 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 22 Nov 2016 22:47:23 GMT</pubDate>
    <dc:creator>mrgibbon</dc:creator>
    <dc:date>2016-11-22T22:47:23Z</dc:date>
    <item>
      <title>How to search and table the retention time of each hot, warm, cold, and frozen bucket by each index?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-to-search-and-table-the-retention-time-of-each-hot-warm-cold/m-p/235393#M8832</link>
      <description>&lt;P&gt;Let's take an Example.&lt;/P&gt;

&lt;P&gt;I have 3 indexes:&lt;BR /&gt;
Index1, Index2, Index3&lt;/P&gt;

&lt;P&gt;For each index the data moves from hot to warm, warm to cold, cold to frozen.&lt;/P&gt;

&lt;P&gt;I want to create a table of each index "retention period time" of each "bucket".&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2016 15:16:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-to-search-and-table-the-retention-time-of-each-hot-warm-cold/m-p/235393#M8832</guid>
      <dc:creator>dpraveen88</dc:creator>
      <dc:date>2016-11-22T15:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to search and table the retention time of each hot, warm, cold, and frozen bucket by each index?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-to-search-and-table-the-retention-time-of-each-hot-warm-cold/m-p/235394#M8833</link>
      <description>&lt;P&gt;I'm not connected now, but in Distributed Management Console there shuold be these information.&lt;BR /&gt;
Otherwise there is an app to do this.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe &lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2016 15:43:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-to-search-and-table-the-retention-time-of-each-hot-warm-cold/m-p/235394#M8833</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2016-11-22T15:43:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to search and table the retention time of each hot, warm, cold, and frozen bucket by each index?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-to-search-and-table-the-retention-time-of-each-hot-warm-cold/m-p/235395#M8834</link>
      <description>&lt;P&gt;Hmm, try this for indexes:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rest /services/admin/indexes | eval yr = floor(frozenTimePeriodInSecs/86400/365)| eval dy = (frozenTimePeriodInSecs/86400) % 365 | eval ret = yr . " years, " . dy . " days" | stats list(splunk_server) list(frozenTimePeriodInSecs) list(ret) by title  
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And this for buckets:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| dbinspect index=* | join index [|rest /services/data/indexes| eval index=title | table index frozenTimePeriodInSecs ] | eval toNow=now()-endEpoch | convert num(toNow) | convert num(frozenTimePeriodInSecs) | convert ctime(endEpoch) AS endEvent | convert ctime(startEpoch) AS startEvent | eval shouldBeFrozen=if( ( state!="hot" AND state!="thawed" ) AND toNow&amp;gt;frozenTimePeriodInSecs,"yes","no") | table index path id state startEvent endEvent shouldBeFrozen toNow frozenTimePeriodInSecs 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 22 Nov 2016 22:47:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-to-search-and-table-the-retention-time-of-each-hot-warm-cold/m-p/235395#M8834</guid>
      <dc:creator>mrgibbon</dc:creator>
      <dc:date>2016-11-22T22:47:23Z</dc:date>
    </item>
  </channel>
</rss>

