<?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: Deletion of splunk sourcetype data in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/Deletion-of-splunk-sourcetype-data/m-p/699425#M20278</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;l&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 25 Sep 2024 05:45:07 GMT</pubDate>
    <dc:creator>uagraw01</dc:creator>
    <dc:date>2024-09-25T05:45:07Z</dc:date>
    <item>
      <title>Deletion of splunk sourcetype data</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Deletion-of-splunk-sourcetype-data/m-p/699418#M20274</link>
      <description>&lt;P&gt;Hello Splunkers !!&lt;/P&gt;&lt;P&gt;I hope all is well.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;There are some sourcetypes in splunk which are having large amount of data but we are not using those sourcetypes in any of the dashboards or saved searches. I want to delete those sourcetypes in splunk and I have some questions associated with the deletion of sourcetype as below.&lt;/P&gt;&lt;P&gt;1. What is the best approach to delete the sourcetypes data in splunk ( using the delete command or from backend )&lt;BR /&gt;2. Does the deletion of historical data from those sourcetypes which impact the other useful sourcetype?&lt;BR /&gt;3. Does it impact on the corruption of the buckets ?&lt;BR /&gt;4. Unused sourcetypes is carrying millions of data. So what will be the fastest approach to delete the large historical data chunks ?&lt;/P&gt;&lt;P&gt;Thanks in advance. Advice and suggestions are really appreciated !!&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2024 14:47:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Deletion-of-splunk-sourcetype-data/m-p/699418#M20274</guid>
      <dc:creator>uagraw01</dc:creator>
      <dc:date>2024-09-18T14:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: Deletion of splunk sourcetype data</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Deletion-of-splunk-sourcetype-data/m-p/699422#M20276</link>
      <description>&lt;P&gt;Individual sourcetypes cannot be deleted.&amp;nbsp; Data is deleted by the bucket, which is a subset of an index.&amp;nbsp; When a bucket is deleted, all events in that bucket are removed from the system.&lt;/P&gt;&lt;P&gt;The &lt;FONT face="courier new,courier"&gt;delete&lt;/FONT&gt; command does not delete data.&amp;nbsp; It merely hides it from view.&lt;/P&gt;&lt;P&gt;There is no backend command to delete data.&lt;/P&gt;&lt;P&gt;If you are fortunate, the undesired sourcetypes are the only ones in their respective indexes.&amp;nbsp; In that case you can set the &lt;FONT face="courier new,courier"&gt;frozenTimePeriodInSecs&lt;/FONT&gt; for the index(es) to 1 and wait for Splunk to delete the buckets in the index(es).&lt;/P&gt;&lt;P&gt;If you are like most sites and have a mixture of sourcetypes in your indexes then it becomes more of a challenge.&amp;nbsp; One option:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Copy the sourcetypes you wish to keep into a different index using the &lt;FONT face="courier new,courier"&gt;collect&lt;/FONT&gt; command.&amp;nbsp; This will impact your ingestion license.&lt;/LI&gt;&lt;LI&gt;Set &lt;FONT face="courier new,courier"&gt;frozenTimePeriodInSecs&lt;/FONT&gt; on the original index to 1 and wait for buckets to be deleted.&amp;nbsp; This will delete everything in the index.&amp;nbsp; On-prem environments can use the &lt;FONT face="courier new,courier"&gt;clean&lt;/FONT&gt; CLI command to delete the index.&lt;/LI&gt;&lt;LI&gt;Revert the &lt;FONT face="courier new,courier"&gt;frozenTimePeriodInSecs&lt;/FONT&gt; setting.&lt;/LI&gt;&lt;LI&gt;Use the collect command to copy the desired data back to the original index.&amp;nbsp; This avoids having to change the queries that use that index name and will impact your ingestion license (again).&amp;nbsp; In an on-prem environment, you can rename the index to the original name.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;See &lt;A href="https://docs.splunk.com/Documentation/Splunk/9.3.0/Indexer/RemovedatafromSplunk#Remove_all_data_from_one_or_all_indexes" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/9.3.0/Indexer/RemovedatafromSplunk#Remove_all_data_from_one_or_all_indexes&lt;/A&gt; for more information.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2024 15:04:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Deletion-of-splunk-sourcetype-data/m-p/699422#M20276</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2024-09-18T15:04:08Z</dc:date>
    </item>
    <item>
      <title>Re: Deletion of splunk sourcetype data</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Deletion-of-splunk-sourcetype-data/m-p/699423#M20277</link>
      <description>&lt;P&gt;&lt;STRONG&gt;1.Using Delete Command&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;In Splunk, the &lt;/SPAN&gt;delete&lt;SPAN&gt; command is used to mark events as &lt;/SPAN&gt;&lt;STRONG&gt;deleted&lt;/STRONG&gt;&lt;SPAN&gt; from search results. However, it &lt;/SPAN&gt;&lt;STRONG&gt;does not physically remove&lt;/STRONG&gt;&lt;SPAN&gt; the events from disk or from the index. Instead, it hides the marked events so they are not returned in future search results. The events are still present in the index but flagged as deleted&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2.&amp;nbsp; Permanently Delete Data via Index Cleanup (Retention Policies)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;To physically delete data from Splunk's indexes, you typically rely on &lt;STRONG&gt;index retention policies&lt;/STRONG&gt;. Splunk automatically deletes older data based on &lt;STRONG&gt;index size&lt;/STRONG&gt; or &lt;STRONG&gt;time-based&lt;/STRONG&gt; retention policies.&lt;/P&gt;&lt;H4&gt;Set Index Retention Policies:&lt;/H4&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Maximum Size (based on disk usage)&lt;/STRONG&gt;: Once the index exceeds a defined size, Splunk will delete the oldest data.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Time-based Retention&lt;/STRONG&gt;: Splunk can automatically remove data that is older than a specific period (e.g., data older than 30 days).&lt;/LI&gt;&lt;/UL&gt;&lt;H4&gt;Steps:&lt;/H4&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;Modify the indexes.conf file, located in $SPLUNK_HOME/etc/system/local/indexes.conf or within an app-specific folder.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Example configuration for size- or time-based retention:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;[your_index]&lt;/SPAN&gt;
&lt;SPAN class=""&gt;maxTotalDataSizeMB&lt;/SPAN&gt; = &lt;SPAN class=""&gt;5000&lt;/SPAN&gt;      &lt;SPAN class=""&gt;# Set the maximum size of the index in MB&lt;/SPAN&gt;
&lt;SPAN class=""&gt;frozenTimePeriodInSecs&lt;/SPAN&gt; = &lt;SPAN class=""&gt;2592000&lt;/SPAN&gt;  &lt;SPAN class=""&gt;# 30 days in seconds (30 * 24 * 60 * 60)&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;/DIV&gt;&lt;UL&gt;&lt;LI&gt;maxTotalDataSizeMB: Sets the maximum disk space the index can use. When this limit is reached, older data is deleted.&lt;/LI&gt;&lt;LI&gt;frozenTimePeriodInSecs: Specifies the number of seconds to retain the data. Once the data is older than this, it will be deleted.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;After the index reaches the size or time threshold, &lt;STRONG&gt;old data is deleted&lt;/STRONG&gt; automatically by Splunk.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Wed, 18 Sep 2024 15:12:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Deletion-of-splunk-sourcetype-data/m-p/699423#M20277</guid>
      <dc:creator>Jawahir</dc:creator>
      <dc:date>2024-09-18T15:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: Deletion of splunk sourcetype data</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Deletion-of-splunk-sourcetype-data/m-p/699425#M20278</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;l&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2024 05:45:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Deletion-of-splunk-sourcetype-data/m-p/699425#M20278</guid>
      <dc:creator>uagraw01</dc:creator>
      <dc:date>2024-09-25T05:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: Deletion of splunk sourcetype data</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Deletion-of-splunk-sourcetype-data/m-p/699426#M20279</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/135068"&gt;@Jawahir&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you both for the nice explanation.&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;As part of my migration activity, I want to clean up or remove all the unnecessary sourcetypes from Splunk so that we may use less disk space and move data more quickly from the old server to the new one.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;But as per your suggestion, delete command will never reduce disk space and &lt;/SPAN&gt;&lt;SPAN&gt;in migration the entire data will have to be copied. Am I understanding it correctly ?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Some more addition on my first ask.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;1. All the sourcetypes coming from one source.&lt;/P&gt;&lt;P&gt;2. All the sourcetypes belongs to only one index.&lt;/P&gt;&lt;P&gt;3. We are using transforms and props to build the sourcetypes. When a particular type of pattern events comes; then transforms create the sourcetype( as mentioned regex inside )&lt;/P&gt;&lt;P&gt;4. All the parsing and filtering will take care by python script.&lt;/P&gt;&lt;P&gt;5.&amp;nbsp;&lt;SPAN&gt;Both unnecessary and necessary sourcetypes are included in that one index.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2024 15:47:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Deletion-of-splunk-sourcetype-data/m-p/699426#M20279</guid>
      <dc:creator>uagraw01</dc:creator>
      <dc:date>2024-09-18T15:47:29Z</dc:date>
    </item>
  </channel>
</rss>

