<?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: Delete the data after indexing in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Delete-the-data-after-indexing/m-p/95307#M19865</link>
    <description>&lt;P&gt;Or for a more automatic approach that involves a little more initial configuring, you can set retention parameters &lt;CODE&gt;indexes.conf&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;This can be a bit more tricky, since the rather short retention requirements you have are a bit unusual.&lt;/P&gt;

&lt;P&gt;I believe (haven't tried it myself, at least not all of them in this type of combination) that you for your index can set the following parameters;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[your_index]
maxTotalDataSizeMB = XXXX
maxDataSize = XXXX
maxHotBuckets = 1
maxHotIdleSecs = 28800
maxWarmDBCount = 0
coldPath.maxDataSizeMB = 1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;where XXX should be something like 10 times more than you would expect the size of your 5 files to be, combined. This is in MB. So if you have 5 files, each about 50 MB in size, set this value to 2500. &lt;/P&gt;

&lt;P&gt;In essence what this does (should do) is to take all the incoming events and store them in a &lt;CODE&gt;hot bucket&lt;/CODE&gt;. After 8 hours (28800 seconds) the &lt;CODE&gt;hot bucket&lt;/CODE&gt; is moved to a &lt;CODE&gt;warm bucket&lt;/CODE&gt;. But since the maximum number of allowed &lt;CODE&gt;warm buckets&lt;/CODE&gt; is 0, Splunk &lt;EM&gt;should&lt;/EM&gt; move it straight to a &lt;CODE&gt;cold bucket&lt;/CODE&gt;. If (and this is another assumption) your indexed data exceeds 1 MB, it will be frozen (i.e. deleted unless you've explicitly configured a &lt;CODE&gt;coldToFrozenDir&lt;/CODE&gt; or &lt;CODE&gt;coldToFrozenScript&lt;/CODE&gt;)&lt;/P&gt;

&lt;P&gt;Please note that you should not store any information you wish to keep in this index, or to store more information than you have specified. It will just get deleted.&lt;/P&gt;

&lt;P&gt;More information can be found here;&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0/admin/AboutConfigurationFiles"&gt;http://docs.splunk.com/Documentation/Splunk/5.0/admin/AboutConfigurationFiles&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0/Indexer/HowSplunkstoresindexes"&gt;http://docs.splunk.com/Documentation/Splunk/5.0/Indexer/HowSplunkstoresindexes&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0/Admin/Wheretofindtheconfigurationfiles"&gt;http://docs.splunk.com/Documentation/Splunk/5.0/Admin/Wheretofindtheconfigurationfiles&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0/Admin/Indexesconf"&gt;http://docs.splunk.com/Documentation/Splunk/5.0/Admin/Indexesconf&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;If you decide to try this out, please report back on the outcome. You're the guinea pig in this experiment &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Godspeed, &lt;/P&gt;

&lt;P&gt;Kristian&lt;/P&gt;</description>
    <pubDate>Thu, 18 Oct 2012 19:24:38 GMT</pubDate>
    <dc:creator>kristian_kolb</dc:creator>
    <dc:date>2012-10-18T19:24:38Z</dc:date>
    <item>
      <title>Delete the data after indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Delete-the-data-after-indexing/m-p/95303#M19861</link>
      <description>&lt;P&gt;lets say daily I recieve 5 files, and I am indexing 5 files and running my query to generate the report. Now, my requirement is after running the query , data from the index should be deleted, Next day I will put another 5 files in the same index and run the query to generate the report.&lt;/P&gt;

&lt;P&gt;Kindly help me in this regard.&lt;/P&gt;

&lt;P&gt;Thanks in Advance,&lt;BR /&gt;
Abhay&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2012 17:50:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Delete-the-data-after-indexing/m-p/95303#M19861</guid>
      <dc:creator>abhayneilam</dc:creator>
      <dc:date>2012-10-18T17:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: Delete the data after indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Delete-the-data-after-indexing/m-p/95304#M19862</link>
      <description>&lt;P&gt;There are two ways I know. The first is using clean from splunk cli and the delete command within search. &lt;/P&gt;

&lt;P&gt;The clean command cleans (deletes) all eventdata from the index.  The catch is you must stop your splunk indexer and then restart after running the command.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;BR /&gt;
$SPLUNKHOME/bin/splunk stop&lt;BR /&gt;
$SPLUNKHOME/bin/splunk clean eventdata -index myindex -f&lt;BR /&gt;
$SPLUNKHOME/bin/splunk start&lt;BR /&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;The search delete command has to be granted expicity to a user or role, even the admin does have the ability to delete unless specified.  All the delete command is a sudo delete it only flags the events as unsearchable, giving the appearance of being deleted. So you will not reclaim disk space.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;BR /&gt;
source="myfiles*.log" | delete&lt;BR /&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2012 18:07:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Delete-the-data-after-indexing/m-p/95304#M19862</guid>
      <dc:creator>bmacias84</dc:creator>
      <dc:date>2012-10-18T18:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: Delete the data after indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Delete-the-data-after-indexing/m-p/95305#M19863</link>
      <description>&lt;P&gt;How to stop "splunk indexer" ? can you please tell me in steps how to "clean the event"&lt;/P&gt;

&lt;P&gt;Thanks in advance !!&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2012 18:16:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Delete-the-data-after-indexing/m-p/95305#M19863</guid>
      <dc:creator>abhayneilam</dc:creator>
      <dc:date>2012-10-18T18:16:47Z</dc:date>
    </item>
    <item>
      <title>Re: Delete the data after indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Delete-the-data-after-indexing/m-p/95306#M19864</link>
      <description>&lt;P&gt;Once an index is cleaned the data is gone (all eventdata in that index), there is no going back.  If you have a distributed search with muliptle indexer and indexes you will have to perform this action on all indexers.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2012 18:22:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Delete-the-data-after-indexing/m-p/95306#M19864</guid>
      <dc:creator>bmacias84</dc:creator>
      <dc:date>2012-10-18T18:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: Delete the data after indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Delete-the-data-after-indexing/m-p/95307#M19865</link>
      <description>&lt;P&gt;Or for a more automatic approach that involves a little more initial configuring, you can set retention parameters &lt;CODE&gt;indexes.conf&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;This can be a bit more tricky, since the rather short retention requirements you have are a bit unusual.&lt;/P&gt;

&lt;P&gt;I believe (haven't tried it myself, at least not all of them in this type of combination) that you for your index can set the following parameters;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[your_index]
maxTotalDataSizeMB = XXXX
maxDataSize = XXXX
maxHotBuckets = 1
maxHotIdleSecs = 28800
maxWarmDBCount = 0
coldPath.maxDataSizeMB = 1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;where XXX should be something like 10 times more than you would expect the size of your 5 files to be, combined. This is in MB. So if you have 5 files, each about 50 MB in size, set this value to 2500. &lt;/P&gt;

&lt;P&gt;In essence what this does (should do) is to take all the incoming events and store them in a &lt;CODE&gt;hot bucket&lt;/CODE&gt;. After 8 hours (28800 seconds) the &lt;CODE&gt;hot bucket&lt;/CODE&gt; is moved to a &lt;CODE&gt;warm bucket&lt;/CODE&gt;. But since the maximum number of allowed &lt;CODE&gt;warm buckets&lt;/CODE&gt; is 0, Splunk &lt;EM&gt;should&lt;/EM&gt; move it straight to a &lt;CODE&gt;cold bucket&lt;/CODE&gt;. If (and this is another assumption) your indexed data exceeds 1 MB, it will be frozen (i.e. deleted unless you've explicitly configured a &lt;CODE&gt;coldToFrozenDir&lt;/CODE&gt; or &lt;CODE&gt;coldToFrozenScript&lt;/CODE&gt;)&lt;/P&gt;

&lt;P&gt;Please note that you should not store any information you wish to keep in this index, or to store more information than you have specified. It will just get deleted.&lt;/P&gt;

&lt;P&gt;More information can be found here;&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0/admin/AboutConfigurationFiles"&gt;http://docs.splunk.com/Documentation/Splunk/5.0/admin/AboutConfigurationFiles&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0/Indexer/HowSplunkstoresindexes"&gt;http://docs.splunk.com/Documentation/Splunk/5.0/Indexer/HowSplunkstoresindexes&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0/Admin/Wheretofindtheconfigurationfiles"&gt;http://docs.splunk.com/Documentation/Splunk/5.0/Admin/Wheretofindtheconfigurationfiles&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0/Admin/Indexesconf"&gt;http://docs.splunk.com/Documentation/Splunk/5.0/Admin/Indexesconf&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;If you decide to try this out, please report back on the outcome. You're the guinea pig in this experiment &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Godspeed, &lt;/P&gt;

&lt;P&gt;Kristian&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2012 19:24:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Delete-the-data-after-indexing/m-p/95307#M19865</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2012-10-18T19:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: Delete the data after indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Delete-the-data-after-indexing/m-p/95308#M19866</link>
      <description>&lt;P&gt;Didn't seem to work. I stopped both splunkd and splunkweb (windows implementation) and issued the 'splunk clean eventdata' command (as admin) - it warned that all data would be lost. I agreed. The CLI indicated that all databases had been cleaned except:&lt;BR /&gt;
Disabled database 'splunklogger': will not clean&lt;BR /&gt;
When I restarted splunk services all of the index data was still there and all the settings were still intact.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2012 17:42:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Delete-the-data-after-indexing/m-p/95308#M19866</guid>
      <dc:creator>gjohnson</dc:creator>
      <dc:date>2012-10-31T17:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: Delete the data after indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Delete-the-data-after-indexing/m-p/95309#M19867</link>
      <description>&lt;P&gt;This has to be completed on each Indexer if your are running a distributed search configuration.  Also you can clean with windows admin accoutn and splunk user that has the admin role? Did you specify index or use "clean all -f".&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2012 17:49:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Delete-the-data-after-indexing/m-p/95309#M19867</guid>
      <dc:creator>bmacias84</dc:creator>
      <dc:date>2012-10-31T17:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: Delete the data after indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Delete-the-data-after-indexing/m-p/95310#M19868</link>
      <description>&lt;P&gt;Thank you guys for your replies...&lt;BR /&gt;
I am currently out of office. I will check in a week and keep you posted.&lt;BR /&gt;
Regards&lt;BR /&gt;
Julien&lt;/P&gt;</description>
      <pubDate>Fri, 24 Oct 2014 09:21:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Delete-the-data-after-indexing/m-p/95310#M19868</guid>
      <dc:creator>jumah35</dc:creator>
      <dc:date>2014-10-24T09:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: Delete the data after indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Delete-the-data-after-indexing/m-p/95311#M19869</link>
      <description>&lt;P&gt;wow - that's a long out of office .... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
could it be, that you used the wrong answer here? the last activity on this was almost exactly two years ago &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Oct 2014 11:10:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Delete-the-data-after-indexing/m-p/95311#M19869</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2014-10-24T11:10:56Z</dc:date>
    </item>
    <item>
      <title>Re: Delete the data after indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Delete-the-data-after-indexing/m-p/95312#M19870</link>
      <description>&lt;P&gt;Oups !! sorry ... &lt;BR /&gt;
Julien&lt;/P&gt;</description>
      <pubDate>Sat, 25 Oct 2014 07:12:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Delete-the-data-after-indexing/m-p/95312#M19870</guid>
      <dc:creator>jumah35</dc:creator>
      <dc:date>2014-10-25T07:12:50Z</dc:date>
    </item>
  </channel>
</rss>

