<?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: retention policy on log files in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/retention-policy-on-log-files/m-p/465163#M80226</link>
    <description>&lt;P&gt;yes indeed, i was looking for a parameter in log-config.cfg like frozenTimePeriodInSecs but i guess there is not, instead of that configure frozenTimePeriodInSecs in indexes.conf plus reduce amount of file size for all log files will do the job for a good retention policy. Thanks for mentioning that most of logs files are ingested to _internal index&lt;/P&gt;</description>
    <pubDate>Tue, 26 May 2020 10:39:57 GMT</pubDate>
    <dc:creator>marone</dc:creator>
    <dc:date>2020-05-26T10:39:57Z</dc:date>
    <item>
      <title>retention policy on log files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/retention-policy-on-log-files/m-p/465152#M80215</link>
      <description>&lt;P&gt;Hi, I want to implement retention policy on log files, in the doc &lt;A href="https://docs.splunk.com/Documentation/Splunk/8.0.3/Troubleshooting/Enabledebuglogging" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.0.3/Troubleshooting/Enabledebuglogging&lt;/A&gt; they didn't mention such a configuration, there is only how to configure the maximum size of a log file (configuration of log-local.cfg), i want this configuration be applied to log files who live in &lt;CODE&gt;SPLUNK_HOME/var/log&lt;/CODE&gt;, is there any workaround to do so ?&lt;/P&gt;</description>
      <pubDate>Sun, 07 Jun 2020 01:29:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/retention-policy-on-log-files/m-p/465152#M80215</guid>
      <dc:creator>marone</dc:creator>
      <dc:date>2020-06-07T01:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: retention policy on log files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/retention-policy-on-log-files/m-p/465153#M80216</link>
      <description>&lt;P&gt;Hi @marone,&lt;BR /&gt;
you can set a retention policy for each index (default is 6 years).&lt;BR /&gt;
you can do this settinf the parameter &lt;CODE&gt;frozenTimePeriodInSecs&lt;/CODE&gt; in &lt;STRONG&gt;indexes.conf&lt;/STRONG&gt;.&lt;/P&gt;

&lt;P&gt;You can find more infos at &lt;A href="https://docs.splunk.com/Documentation/Splunk/8.0.4/Indexer/Setaretirementandarchivingpolicy"&gt;https://docs.splunk.com/Documentation/Splunk/8.0.4/Indexer/Setaretirementandarchivingpolicy&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 08:58:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/retention-policy-on-log-files/m-p/465153#M80216</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-05-26T08:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: retention policy on log files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/retention-policy-on-log-files/m-p/465154#M80217</link>
      <description>&lt;P&gt;You can add below frozenTimePeriodInSecs in your index stanza.&lt;BR /&gt;
Example: If you want to retain the logs for 1 day then frozenTimePeriodInSecs = 86400&lt;/P&gt;

&lt;P&gt;[_internal]&lt;/P&gt;

&lt;P&gt;frozenTimePeriodInSecs = 86400&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 09:00:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/retention-policy-on-log-files/m-p/465154#M80217</guid>
      <dc:creator>venkateshparank</dc:creator>
      <dc:date>2020-05-26T09:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: retention policy on log files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/retention-policy-on-log-files/m-p/465155#M80218</link>
      <description>&lt;P&gt;Hello @marone,&lt;/P&gt;

&lt;P&gt;which log files do you have in &lt;CODE&gt;$SPLUNK_HOME/etc&lt;/CODE&gt; ? Most of logs are under &lt;CODE&gt;$SPLUNK_HOME/var/log&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 09:02:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/retention-policy-on-log-files/m-p/465155#M80218</guid>
      <dc:creator>PavelP</dc:creator>
      <dc:date>2020-05-26T09:02:01Z</dc:date>
    </item>
    <item>
      <title>Re: retention policy on log files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/retention-policy-on-log-files/m-p/465156#M80219</link>
      <description>&lt;P&gt;thanks for your comment, yes a typo error logs are in &lt;CODE&gt;$SPLUNK_HOME/var/log&lt;/CODE&gt; and the log-local.cfg are in &lt;CODE&gt;$SPLUNK_HOME/etc&lt;/CODE&gt; i modified it &lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 09:18:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/retention-policy-on-log-files/m-p/465156#M80219</guid>
      <dc:creator>marone</dc:creator>
      <dc:date>2020-05-26T09:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: retention policy on log files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/retention-policy-on-log-files/m-p/465157#M80220</link>
      <description>&lt;P&gt;thanks for reply, i's true what you are saying but your answer is applied to bucket stored in &lt;CODE&gt;$SPLUNK_HOME/var/lib/splunk&lt;/CODE&gt;, but the information wil still in log files who lives in &lt;CODE&gt;SPLUNK_HOME/var/log&lt;/CODE&gt; as I said in my question, i want to apply retention policy on those logs (configure log-local.cfg if it's possible or another way), or applying retention policy as you said for index will automaitcally delete data from logs (aka from &lt;CODE&gt;SPLUNK_HOME/var/log&lt;/CODE&gt;) ? &lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 09:28:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/retention-policy-on-log-files/m-p/465157#M80220</guid>
      <dc:creator>marone</dc:creator>
      <dc:date>2020-05-26T09:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: retention policy on log files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/retention-policy-on-log-files/m-p/465158#M80221</link>
      <description>&lt;P&gt;thanks for reply, i's true what you are saying but your answer is applied to bucket stored in &lt;CODE&gt;$SPLUNK_HOME/var/lib/splunk&lt;/CODE&gt;, but the information wil still in log files who lives in &lt;CODE&gt;SPLUNK_HOME/var/log&lt;/CODE&gt; as I said in my question, i want to apply retention policy on those logs (configure log-local.cfg if it's possible or another way), or applying retention policy as you said for index will automaitcally delete data from logs (aka from &lt;CODE&gt;SPLUNK_HOME/var/log&lt;/CODE&gt;) ? &lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 09:29:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/retention-policy-on-log-files/m-p/465158#M80221</guid>
      <dc:creator>marone</dc:creator>
      <dc:date>2020-05-26T09:29:01Z</dc:date>
    </item>
    <item>
      <title>Re: retention policy on log files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/retention-policy-on-log-files/m-p/465159#M80222</link>
      <description>&lt;P&gt;All logs under SPLUNK_HOME/var/log will be ingested into _internal index.&lt;BR /&gt;
Events in this index are kept for 6 years by default.&lt;BR /&gt;
If you want to change the retention period, you can modify the same for frozenTimePeriodInSecs in indexes.conf for _internal index. Hope this helps and please accept if this helps.&lt;/P&gt;

&lt;P&gt;Below is the example:&lt;/P&gt;

&lt;P&gt;[_internal]&lt;BR /&gt;
homePath   = $SPLUNK_DB/_internaldb/db&lt;BR /&gt;
coldPath   = $SPLUNK_DB/_internaldb/colddb&lt;BR /&gt;
thawedPath = $SPLUNK_DB/_internaldb/thaweddb&lt;BR /&gt;
maxDataSize = 100&lt;BR /&gt;
frozenTimePeriodInSecs = 2419200&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:31:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/retention-policy-on-log-files/m-p/465159#M80222</guid>
      <dc:creator>venkateshparank</dc:creator>
      <dc:date>2020-09-30T05:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: retention policy on log files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/retention-policy-on-log-files/m-p/465160#M80223</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/67511"&gt;@marone&lt;/a&gt;,&lt;BR /&gt;
let me understand: you're speaking of Splunk log files (e.g. splunkd.log.1 2 3 4 5) is it correct?&lt;/P&gt;

&lt;P&gt;After they are written on disk, they are read by Splunk and stored in _internal index, this means that you can delete the splunkd.log.1 2 3 4 5 files.&lt;/P&gt;

&lt;P&gt;If instead you want to manage retention on _internal index, you have to change the &lt;CODE&gt;frozenTimePeriodInSecs&lt;/CODE&gt; parameter in $SPLUNK_HOME/system/local/indexes.conf, if not present create it copying the _internal stanza in default folder.&lt;/P&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:31:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/retention-policy-on-log-files/m-p/465160#M80223</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-09-30T05:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: retention policy on log files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/retention-policy-on-log-files/m-p/465161#M80224</link>
      <description>&lt;P&gt;@marone, I think you asking about log file rotation and autodeletion, right? This is configured under log.cfg:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;appender.rootAppender=ConsoleAppender
appender.rootAppender.layout=PatternLayout
appender.rootAppender.layout.ConversionPattern=%d{%m-%d-%Y %H:%M:%S.%l %z} %-5p %c - %m%n
# if these log files are getting too big for your liking, turn down the maxFileSize.
# it's best to not make them too small, however, because these logs can be very
# useful in troubleshooting.
appender.A1=RollingFileAppender
appender.A1.fileName=${SPLUNK_HOME}/var/log/splunk/splunkd.log
appender.A1.maxFileSize=25000000 # default: 25MB (specified in bytes).
appender.A1.maxBackupIndex=5
appender.A1.layout=PatternLayout
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;as you can see, for most log files that is max 5 log files x 25MB. More for license log.&lt;/P&gt;

&lt;P&gt;Is this the info that you looked for?&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 09:54:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/retention-policy-on-log-files/m-p/465161#M80224</guid>
      <dc:creator>PavelP</dc:creator>
      <dc:date>2020-05-26T09:54:12Z</dc:date>
    </item>
    <item>
      <title>Re: retention policy on log files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/retention-policy-on-log-files/m-p/465162#M80225</link>
      <description>&lt;P&gt;yes i saw the doc was looking for a parameter like &lt;CODE&gt;frozenTimePeriodInSecs&lt;/CODE&gt; in indexes.conf, but i think decreasing maxFilesize and number of backup index plus configuring &lt;CODE&gt;frozenTimePeriodInSecs&lt;/CODE&gt; for &lt;CODE&gt;_internal&lt;/CODE&gt;will result to a good retention policy i guess &lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 10:29:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/retention-policy-on-log-files/m-p/465162#M80225</guid>
      <dc:creator>marone</dc:creator>
      <dc:date>2020-05-26T10:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: retention policy on log files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/retention-policy-on-log-files/m-p/465163#M80226</link>
      <description>&lt;P&gt;yes indeed, i was looking for a parameter in log-config.cfg like frozenTimePeriodInSecs but i guess there is not, instead of that configure frozenTimePeriodInSecs in indexes.conf plus reduce amount of file size for all log files will do the job for a good retention policy. Thanks for mentioning that most of logs files are ingested to _internal index&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 10:39:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/retention-policy-on-log-files/m-p/465163#M80226</guid>
      <dc:creator>marone</dc:creator>
      <dc:date>2020-05-26T10:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: retention policy on log files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/retention-policy-on-log-files/m-p/465164#M80227</link>
      <description>&lt;P&gt;thanks i see what you mean &lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 12:17:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/retention-policy-on-log-files/m-p/465164#M80227</guid>
      <dc:creator>marone</dc:creator>
      <dc:date>2020-05-26T12:17:10Z</dc:date>
    </item>
  </channel>
</rss>

