<?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 Why are files in a folder not getting deleted on the universal forwarder with move_policy=sinkhole in the inputs.conf batch stanza? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Why-are-files-in-a-folder-not-getting-deleted-on-the-universal/m-p/285605#M54550</link>
    <description>&lt;P&gt;I setup my universal forwarder to monitor a folder and send the contents to one of my indexers.   That works great.  I changed the inputs.conf from the monitor stanza to the batch stanza and added the property &lt;CODE&gt;move_policy=sinkhole&lt;/CODE&gt;.   I expected that the files in the folder would be deleted after they are sent to the indexer.  This is not happening.  The documentation indicates that this should be the case.  Does the Universal Forwarder support the batch stanza?&lt;/P&gt;</description>
    <pubDate>Thu, 15 Sep 2016 18:29:42 GMT</pubDate>
    <dc:creator>joeyblasko</dc:creator>
    <dc:date>2016-09-15T18:29:42Z</dc:date>
    <item>
      <title>Why are files in a folder not getting deleted on the universal forwarder with move_policy=sinkhole in the inputs.conf batch stanza?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-are-files-in-a-folder-not-getting-deleted-on-the-universal/m-p/285605#M54550</link>
      <description>&lt;P&gt;I setup my universal forwarder to monitor a folder and send the contents to one of my indexers.   That works great.  I changed the inputs.conf from the monitor stanza to the batch stanza and added the property &lt;CODE&gt;move_policy=sinkhole&lt;/CODE&gt;.   I expected that the files in the folder would be deleted after they are sent to the indexer.  This is not happening.  The documentation indicates that this should be the case.  Does the Universal Forwarder support the batch stanza?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2016 18:29:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-are-files-in-a-folder-not-getting-deleted-on-the-universal/m-p/285605#M54550</guid>
      <dc:creator>joeyblasko</dc:creator>
      <dc:date>2016-09-15T18:29:42Z</dc:date>
    </item>
    <item>
      <title>Re: Why are files in a folder not getting deleted on the universal forwarder with move_policy=sinkhole in the inputs.conf batch stanza?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-are-files-in-a-folder-not-getting-deleted-on-the-universal/m-p/285606#M54551</link>
      <description>&lt;P&gt;Yes, the UF supports the batch stanza and it should be deleting the files. Can you share the full batch stanza that you're using? Is this on Windows or Linux? I'm thinking that on Windows the files might be locked by whatever is generating them; I imagine something like Process Monitor could be used to determine if that's happening. Other than that, if the UF isn't running as root on Linux or Local System on Windows, I would consider checking file system permissions to verify that the UF has rights to delete. In either of those cases you might see a line in splunkd.log that looks like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;09-15-2016 15:37:01.318 -0500 ERROR TailReader - Unable to remove sinkhole file: path=/opt/splunk/app/xyzzy/xyzzy.log, errno=Permission denied
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Sep 2016 20:40:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-are-files-in-a-folder-not-getting-deleted-on-the-universal/m-p/285606#M54551</guid>
      <dc:creator>jtacy</dc:creator>
      <dc:date>2016-09-15T20:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: Why are files in a folder not getting deleted on the universal forwarder with move_policy=sinkhole in the inputs.conf batch stanza?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-are-files-in-a-folder-not-getting-deleted-on-the-universal/m-p/285607#M54552</link>
      <description>&lt;P&gt;Just one little addition: the UF will only remove new files since the &lt;CODE&gt;inputs.conf&lt;/CODE&gt; was changed, because the other older files were already indexed and therefore ignored by the UF.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2016 20:53:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-are-files-in-a-folder-not-getting-deleted-on-the-universal/m-p/285607#M54552</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2016-09-15T20:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: Why are files in a folder not getting deleted on the universal forwarder with move_policy=sinkhole in the inputs.conf batch stanza?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-are-files-in-a-folder-not-getting-deleted-on-the-universal/m-p/285608#M54553</link>
      <description>&lt;P&gt;Interesting! The behavior I'm seeing on 6.4.0 is that when the stanza is changed to a batch and the UF restarted, files that match the target path are indexed again and deleted.&lt;/P&gt;

&lt;P&gt;The monitor stanza that I tested looks like:&lt;BR /&gt;
[monitor:///opt/splunk/app/monitorswap2/*.log]&lt;BR /&gt;
sourcetype = xyzzy&lt;BR /&gt;
index = main&lt;/P&gt;

&lt;P&gt;...and the batch stanza looks like:&lt;BR /&gt;
[batch:///opt/splunk/app/monitorswap2/*.log]&lt;BR /&gt;
sourcetype = xyzzy&lt;BR /&gt;
index = main&lt;BR /&gt;
move_policy = sinkhole&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2016 21:37:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-are-files-in-a-folder-not-getting-deleted-on-the-universal/m-p/285608#M54553</guid>
      <dc:creator>jtacy</dc:creator>
      <dc:date>2016-09-15T21:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: Why are files in a folder not getting deleted on the universal forwarder with move_policy=sinkhole in the inputs.conf batch stanza?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-are-files-in-a-folder-not-getting-deleted-on-the-universal/m-p/285609#M54554</link>
      <description>&lt;P&gt;I am on linux CentOS 7.   Here is the stanza:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///data/test]
disabled = 0
index = test
sourcetype = testJson
crcSalt = 
_TCP_ROUTING = test_dev

[batch:///data/test]
move_policy = sinkhole
disabled = 0
index = test
sourcetype = testJson
crcSalt = 
_TCP_ROUTING = test_dev
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 19 Sep 2016 14:18:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-are-files-in-a-folder-not-getting-deleted-on-the-universal/m-p/285609#M54554</guid>
      <dc:creator>joeyblasko</dc:creator>
      <dc:date>2016-09-19T14:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: Why are files in a folder not getting deleted on the universal forwarder with move_policy=sinkhole in the inputs.conf batch stanza?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-are-files-in-a-folder-not-getting-deleted-on-the-universal/m-p/285610#M54555</link>
      <description>&lt;P&gt;The crcSalt stanza is set to the SOURCE value  but when I posted it was removed.  It is correct in my conf file.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 14:20:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-are-files-in-a-folder-not-getting-deleted-on-the-universal/m-p/285610#M54555</guid>
      <dc:creator>joeyblasko</dc:creator>
      <dc:date>2016-09-19T14:20:05Z</dc:date>
    </item>
    <item>
      <title>Re: Why are files in a folder not getting deleted on the universal forwarder with move_policy=sinkhole in the inputs.conf batch stanza?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-are-files-in-a-folder-not-getting-deleted-on-the-universal/m-p/285611#M54556</link>
      <description>&lt;P&gt;You don't have the monitor and batch stanzas in place at the same time, correct? The files won't be deleted if you have monitor and batch stanzas watching the same path. If you only have a batch stanza and the files still aren't being deleted I'd suspect that the UF doesn't have the required permissions.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 16:33:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-are-files-in-a-folder-not-getting-deleted-on-the-universal/m-p/285611#M54556</guid>
      <dc:creator>jtacy</dc:creator>
      <dc:date>2016-09-19T16:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: Why are files in a folder not getting deleted on the universal forwarder with move_policy=sinkhole in the inputs.conf batch stanza?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-are-files-in-a-folder-not-getting-deleted-on-the-universal/m-p/285612#M54557</link>
      <description>&lt;P&gt;I do not have them in the conf file at the same time.  I will look at the permissions.  &lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 18:10:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-are-files-in-a-folder-not-getting-deleted-on-the-universal/m-p/285612#M54557</guid>
      <dc:creator>joeyblasko</dc:creator>
      <dc:date>2016-09-19T18:10:09Z</dc:date>
    </item>
  </channel>
</rss>

