<?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: What are ways to clean up log files which are already indexed? in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/What-are-ways-to-clean-up-log-files-which-are-already-indexed/m-p/243444#M6828</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Sure, I've taken this from &lt;A href="https://docs.splunk.com/Documentation/Splunk/6.5.0/Admin/Inputsconf"&gt;admin guide&lt;/A&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[batch:///path/to/log/file]
sourcetype = my_sourcetype
index = my_index
recursive = false
move_policy = sinkhole
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Remember to add "move_policy = sinkhole".&lt;/P&gt;</description>
    <pubDate>Tue, 22 Nov 2016 03:20:02 GMT</pubDate>
    <dc:creator>vincenteous</dc:creator>
    <dc:date>2016-11-22T03:20:02Z</dc:date>
    <item>
      <title>What are ways to clean up log files which are already indexed?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/What-are-ways-to-clean-up-log-files-which-are-already-indexed/m-p/243441#M6825</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
we have a forwarder installed in different VM's and have log files like 2016-11-01 to 2016-11-21 and all them are indexed.&lt;/P&gt;

&lt;P&gt;every month's end, i need to clean up logs from date 01 to 15.&lt;BR /&gt;
how can i achieve this in Splunk? do we need write a custom script and configure cronjob in Splunk machine?&lt;/P&gt;

&lt;P&gt;it would be great, if you provide any different thoughts to achieve this.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2016 17:12:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/What-are-ways-to-clean-up-log-files-which-are-already-indexed/m-p/243441#M6825</guid>
      <dc:creator>rajgowd1</dc:creator>
      <dc:date>2016-11-21T17:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: What are ways to clean up log files which are already indexed?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/What-are-ways-to-clean-up-log-files-which-are-already-indexed/m-p/243442#M6826</link>
      <description>&lt;P&gt;Hi rajgowd1,&lt;/P&gt;

&lt;P&gt;I believe the best Splunk can offer by default is using [batch://] instead of [monitor://] to immediately destroy the original log file after indexing. Based on your requirement, a custom script with cronjob will be the most suitable.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2016 18:52:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/What-are-ways-to-clean-up-log-files-which-are-already-indexed/m-p/243442#M6826</guid>
      <dc:creator>vincenteous</dc:creator>
      <dc:date>2016-11-21T18:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: What are ways to clean up log files which are already indexed?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/What-are-ways-to-clean-up-log-files-which-are-already-indexed/m-p/243443#M6827</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
thank you.can you please provide steps to implement using [batch://] option.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2016 19:08:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/What-are-ways-to-clean-up-log-files-which-are-already-indexed/m-p/243443#M6827</guid>
      <dc:creator>rajgowd1</dc:creator>
      <dc:date>2016-11-21T19:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: What are ways to clean up log files which are already indexed?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/What-are-ways-to-clean-up-log-files-which-are-already-indexed/m-p/243444#M6828</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Sure, I've taken this from &lt;A href="https://docs.splunk.com/Documentation/Splunk/6.5.0/Admin/Inputsconf"&gt;admin guide&lt;/A&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[batch:///path/to/log/file]
sourcetype = my_sourcetype
index = my_index
recursive = false
move_policy = sinkhole
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Remember to add "move_policy = sinkhole".&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2016 03:20:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/What-are-ways-to-clean-up-log-files-which-are-already-indexed/m-p/243444#M6828</guid>
      <dc:creator>vincenteous</dc:creator>
      <dc:date>2016-11-22T03:20:02Z</dc:date>
    </item>
  </channel>
</rss>

