<?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 set a retention policy to delete any data in a certain index after 30 days? in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-set-a-retention-policy-to-delete-any-data-in-a-certain/m-p/205315#M115</link>
    <description>&lt;P&gt;Following are the configurations that  you can set to keep data only for exactly 30 days. The data in Splunk is written in hot buckets. The name of the bucket includes the min and max of the _time of the data included in it. When Splunk has to apply data retention, based on age, then it picks the buckets whose max _time value is older than retention period. So if a buckets contains data for 3 day period, it won't get deleted until day 33 and you'd see some partial data for day 31/32/33 (that's what is happening in your case). &lt;/P&gt;

&lt;P&gt;The below setting will enforce Splunk to contain maximum of 1 day worth of data in the buckets, so that buckets can retire on exact day basis. NOTE:  If you set this too small, you can get an explosion of hot/warm  buckets in the filesystem. Default to 90 days. &lt;/P&gt;

&lt;P&gt;Indexes.conf on your Indexers&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yourindex]
...other settings...
maxHotSpanSecs = 86400 # 1 day
frozenTimePeriodInSecs = 2592000   # 30 days
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;See more info of retention policies here: &lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.1/Indexer/Setaretirementandarchivingpolicy"&gt;http://docs.splunk.com/Documentation/Splunk/6.4.1/Indexer/Setaretirementandarchivingpolicy&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://wiki.splunk.com/Deploy:BucketRotationAndRetention"&gt;https://wiki.splunk.com/Deploy:BucketRotationAndRetention&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 21 Sep 2016 18:47:22 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2016-09-21T18:47:22Z</dc:date>
    <item>
      <title>How to set a retention policy to delete any data in a certain index after 30 days?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-set-a-retention-policy-to-delete-any-data-in-a-certain/m-p/205312#M112</link>
      <description>&lt;P&gt;Simply put, I'd like to delete any data in a certain index after 30 days. I set the retention policy to 30 days, but I still have events from over 30 days ago.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2016 16:53:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-set-a-retention-policy-to-delete-any-data-in-a-certain/m-p/205312#M112</guid>
      <dc:creator>tmontney</dc:creator>
      <dc:date>2016-09-21T16:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a retention policy to delete any data in a certain index after 30 days?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-set-a-retention-policy-to-delete-any-data-in-a-certain/m-p/205313#M113</link>
      <description>&lt;P&gt;Have you set &lt;CODE&gt;frozenTimePeriodInSecs&lt;/CODE&gt; to 30 days in seconds?&lt;/P&gt;

&lt;P&gt;More about it at &lt;A href="https://answers.splunk.com/answers/123814/how-is-frozentimeperiodinsecs-applied.html"&gt;How is frozenTimePeriodInSecs applied?&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2016 17:03:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-set-a-retention-policy-to-delete-any-data-in-a-certain/m-p/205313#M113</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2016-09-21T17:03:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a retention policy to delete any data in a certain index after 30 days?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-set-a-retention-policy-to-delete-any-data-in-a-certain/m-p/205314#M114</link>
      <description>&lt;P&gt;I don't have a frozen path specified.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2016 17:06:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-set-a-retention-policy-to-delete-any-data-in-a-certain/m-p/205314#M114</guid>
      <dc:creator>tmontney</dc:creator>
      <dc:date>2016-09-21T17:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a retention policy to delete any data in a certain index after 30 days?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-set-a-retention-policy-to-delete-any-data-in-a-certain/m-p/205315#M115</link>
      <description>&lt;P&gt;Following are the configurations that  you can set to keep data only for exactly 30 days. The data in Splunk is written in hot buckets. The name of the bucket includes the min and max of the _time of the data included in it. When Splunk has to apply data retention, based on age, then it picks the buckets whose max _time value is older than retention period. So if a buckets contains data for 3 day period, it won't get deleted until day 33 and you'd see some partial data for day 31/32/33 (that's what is happening in your case). &lt;/P&gt;

&lt;P&gt;The below setting will enforce Splunk to contain maximum of 1 day worth of data in the buckets, so that buckets can retire on exact day basis. NOTE:  If you set this too small, you can get an explosion of hot/warm  buckets in the filesystem. Default to 90 days. &lt;/P&gt;

&lt;P&gt;Indexes.conf on your Indexers&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yourindex]
...other settings...
maxHotSpanSecs = 86400 # 1 day
frozenTimePeriodInSecs = 2592000   # 30 days
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;See more info of retention policies here: &lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.1/Indexer/Setaretirementandarchivingpolicy"&gt;http://docs.splunk.com/Documentation/Splunk/6.4.1/Indexer/Setaretirementandarchivingpolicy&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://wiki.splunk.com/Deploy:BucketRotationAndRetention"&gt;https://wiki.splunk.com/Deploy:BucketRotationAndRetention&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2016 18:47:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-set-a-retention-policy-to-delete-any-data-in-a-certain/m-p/205315#M115</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-09-21T18:47:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a retention policy to delete any data in a certain index after 30 days?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-set-a-retention-policy-to-delete-any-data-in-a-certain/m-p/205316#M116</link>
      <description>&lt;P&gt;That's fine as by default, when reaching the frozen state, the data is being deleted.  &lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2016 18:57:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-set-a-retention-policy-to-delete-any-data-in-a-certain/m-p/205316#M116</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2016-09-21T18:57:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a retention policy to delete any data in a certain index after 30 days?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-set-a-retention-policy-to-delete-any-data-in-a-certain/m-p/205317#M117</link>
      <description>&lt;P&gt;So if I create an indexes.conf in '.\Splunk\etc\system\local' and change it to this (and restart splunk service), it'll work?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[wineventlog]
coldPath = $SPLUNK_DB\wineventlog\colddb
homePath = $SPLUNK_DB\wineventlog\db
thawedPath = $SPLUNK_DB\wineventlog\thaweddb
maxHotSpanSecs = 2592000
frozenTimePeriodInSecs = 2592000
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 21 Sep 2016 19:03:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-set-a-retention-policy-to-delete-any-data-in-a-certain/m-p/205317#M117</guid>
      <dc:creator>tmontney</dc:creator>
      <dc:date>2016-09-21T19:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a retention policy to delete any data in a certain index after 30 days?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-set-a-retention-policy-to-delete-any-data-in-a-certain/m-p/205318#M118</link>
      <description>&lt;P&gt;Oops, I'm now noticing it dropped from 4 years to 2 years. Perhaps it's working...&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2016 19:04:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-set-a-retention-policy-to-delete-any-data-in-a-certain/m-p/205318#M118</guid>
      <dc:creator>tmontney</dc:creator>
      <dc:date>2016-09-21T19:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a retention policy to delete any data in a certain index after 30 days?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-set-a-retention-policy-to-delete-any-data-in-a-certain/m-p/205319#M119</link>
      <description>&lt;P&gt;The maxHotSpanSecs value you set is 30 days (I suggested 1 day) ,as well as frozenTimePeriodInSecs. So total data will be retained only for 30 days. That is what you intend to do.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2016 20:27:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-set-a-retention-policy-to-delete-any-data-in-a-certain/m-p/205319#M119</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-09-21T20:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a retention policy to delete any data in a certain index after 30 days?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-set-a-retention-policy-to-delete-any-data-in-a-certain/m-p/205320#M120</link>
      <description>&lt;P&gt;It should.. You've stand alone Indexer? Do you have one indexer OR many? The changes from location 'Splunk\etc\system\local' works but the preferred location is etc/apps under some custom app (for better portability).&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2016 20:29:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-set-a-retention-policy-to-delete-any-data-in-a-certain/m-p/205320#M120</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-09-21T20:29:17Z</dc:date>
    </item>
  </channel>
</rss>

