<?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: Splunk UF - Cannot remove files using batch input in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-UF-Cannot-remove-files-using-batch-input/m-p/706500#M116833</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/194981"&gt;@dural_yyz&lt;/a&gt;You got me here. I was pretty sure this setting was for monitor input only. But come to think of it, it makes sense in batch context as well (you don't want to batch-read a file while it's still being - for example - rsynced from remote).&lt;/P&gt;&lt;P&gt;But that should not change much in terms of deleting files. I reckon it could only make Splunk end reading prematurely. But together with a lock on an open file from another process that could make file undeletable (windows has different concurrent access paradigm than unices).&lt;/P&gt;</description>
    <pubDate>Tue, 10 Dec 2024 20:33:16 GMT</pubDate>
    <dc:creator>PickleRick</dc:creator>
    <dc:date>2024-12-10T20:33:16Z</dc:date>
    <item>
      <title>Splunk UF - Cannot remove files using batch input</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-UF-Cannot-remove-files-using-batch-input/m-p/706472#M116829</link>
      <description>&lt;P&gt;Hello to everyone!&lt;BR /&gt;I planned to ingest *.csv files using Universal Forwarder from Windows Server 2019 in batch mode.&lt;BR /&gt;It sounds pretty trivial, but I collided with the problem.&lt;BR /&gt;After an appearance of a new file, I observe new events through a search head, and in the end, expecting that file will be deleted by Splunk UF, but the file is still remaining.&lt;BR /&gt;It seemed that the problem was related to file access, but I can't find any related errors in the logs of this UF instance.&lt;/P&gt;&lt;P&gt;So, what can be the root of this behavior?&lt;/P&gt;&lt;P&gt;inputs.conf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[batch://C:\ProgramData\ScriptLog\spl_export_vmtools_status\vmtools_stats_*.csv]
disabled = false
index = vsi
crcSalt = &amp;lt;SOURCE&amp;gt;
move_policy = sinkhole
sourcetype  = vsi_file_vmtools-stats&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;props.conf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[vsi_file_vmtools-stats]
ANNOTATE_PUNCT = false
BREAK_ONLY_BEFORE_DATE = true
INDEXED_EXTRACTIONS = CSV
HEADER_FIELD_LINE_NUMBER = 1
SHOULD_LINEMERGE = false
TIMESTAMP_FIELDS = Time&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2024 13:32:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-UF-Cannot-remove-files-using-batch-input/m-p/706472#M116829</guid>
      <dc:creator>NoSpaces</dc:creator>
      <dc:date>2024-12-10T13:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk UF - Cannot remove files using batch input</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-UF-Cannot-remove-files-using-batch-input/m-p/706483#M116830</link>
      <description>&lt;LI-CODE lang="markup"&gt;time_before_close = &amp;lt;integer&amp;gt;
* The amount of time, in seconds, that the file monitor must wait for
  modifications before closing a file after reaching an End-of-File
  (EOF) marker.
* Tells the input not to close files that have been updated in the
  past 'time_before_close' seconds.
* Default: 3&lt;/LI-CODE&gt;&lt;P&gt;Is it possible that the file is not producing an EOF marker? or that something keeps chatting to the file?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2024 14:45:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-UF-Cannot-remove-files-using-batch-input/m-p/706483#M116830</guid>
      <dc:creator>dural_yyz</dc:creator>
      <dc:date>2024-12-10T14:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk UF - Cannot remove files using batch input</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-UF-Cannot-remove-files-using-batch-input/m-p/706495#M116831</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/194981"&gt;@dural_yyz&lt;/a&gt;You're quoting from the monitor input spec, &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/253209"&gt;@NoSpaces&lt;/a&gt; is asking about batch input.&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/253209"&gt;@NoSpaces&lt;/a&gt;There are two reasons that file might not get deleted even if it theoretically should.&lt;/P&gt;&lt;P&gt;1. Permissions - check that the user splunkd.exe runs with has proper permissions to the directory and log files&lt;/P&gt;&lt;P&gt;2. Locking - if the file stays opened for writing, Splunk might not be able to remove it.&lt;/P&gt;&lt;P&gt;Unfortunately while monitor input is typically relatively verbose about its problems with reading files, I'm not sure about how batch input behaves in that regard.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2024 18:01:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-UF-Cannot-remove-files-using-batch-input/m-p/706495#M116831</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-12-10T18:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk UF - Cannot remove files using batch input</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-UF-Cannot-remove-files-using-batch-input/m-p/706499#M116832</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/194981"&gt;@dural_yyz&lt;/a&gt;You're quoting from the monitor input spec, &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/253209"&gt;@NoSpaces&lt;/a&gt; is asking about batch input.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Yes - admittedly I'm not as familiar with batch so I verified with the docs where I found this under batch.&amp;nbsp; I guess they did not write out the config definitions twice but just did a reference back to how it works with monitor.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# The following settings work identically as for [monitor::] stanzas,
# documented previously
host_regex = &amp;lt;regular expression&amp;gt;
host_segment = &amp;lt;integer&amp;gt;
crcSalt = &amp;lt;string&amp;gt;
recursive = &amp;lt;boolean&amp;gt;
whitelist = &amp;lt;regular expression&amp;gt;
blacklist = &amp;lt;regular expression&amp;gt;
initCrcLength = &amp;lt;integer&amp;gt;
time_before_close = &amp;lt;integer&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp;answers are more likely a good place to start.&amp;nbsp; It's possible you can did into the default debug logging levels at the UF but I wouldn't start with trying to increase logging until exhausting all other options first.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2024 20:25:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-UF-Cannot-remove-files-using-batch-input/m-p/706499#M116832</guid>
      <dc:creator>dural_yyz</dc:creator>
      <dc:date>2024-12-10T20:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk UF - Cannot remove files using batch input</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-UF-Cannot-remove-files-using-batch-input/m-p/706500#M116833</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/194981"&gt;@dural_yyz&lt;/a&gt;You got me here. I was pretty sure this setting was for monitor input only. But come to think of it, it makes sense in batch context as well (you don't want to batch-read a file while it's still being - for example - rsynced from remote).&lt;/P&gt;&lt;P&gt;But that should not change much in terms of deleting files. I reckon it could only make Splunk end reading prematurely. But together with a lock on an open file from another process that could make file undeletable (windows has different concurrent access paradigm than unices).&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2024 20:33:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-UF-Cannot-remove-files-using-batch-input/m-p/706500#M116833</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-12-10T20:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk UF - Cannot remove files using batch input</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-UF-Cannot-remove-files-using-batch-input/m-p/706526#M116837</link>
      <description>&lt;P&gt;Thank you for your thoughts, colleagues.&lt;BR /&gt;I will check the idea of &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/194981"&gt;@dural_yyz&lt;/a&gt;&amp;nbsp;that mentioned the absence of an EOF marker.&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp;, talking about permission, I'm pretty sure that this is not the case because about a month ago I found out that new Splunk UFs started to use "USE_LOCAL_SYSTEM = 0" by default during silent install.&lt;BR /&gt;Because of it I was observing something like this on the affected UF instances:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;10-27-2024 21:50:16.756 +0300 ERROR TailReader [3644 tailreader0] - Unable to remove sinkhole file: path=E:\path\file.xml, errno=Access is denied.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2024 09:08:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-UF-Cannot-remove-files-using-batch-input/m-p/706526#M116837</guid>
      <dc:creator>NoSpaces</dc:creator>
      <dc:date>2024-12-11T09:08:22Z</dc:date>
    </item>
  </channel>
</rss>

