<?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 Batch file Input not removing files. in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Batch-file-Input-not-removing-files/m-p/670917#M112475</link>
    <description>&lt;P&gt;I am attempting to use Splunk to remove the Oracle WebLogic files that are filling up our harddrive.&lt;/P&gt;&lt;P&gt;I have been able to remove other files with a different filename format using the batch command.&lt;/P&gt;&lt;P&gt;But... the following stanza is not working&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[batch://C:\Oracle\config\domains\csel\servers\...\DefaultAuditRecorder.*.log]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The filename format is: DefaultAuditRecorder.############.log&lt;/P&gt;&lt;P&gt;where # is a number&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;</description>
    <pubDate>Wed, 06 Dec 2023 01:36:14 GMT</pubDate>
    <dc:creator>kenoski</dc:creator>
    <dc:date>2023-12-06T01:36:14Z</dc:date>
    <item>
      <title>Batch file Input not removing files.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Batch-file-Input-not-removing-files/m-p/670917#M112475</link>
      <description>&lt;P&gt;I am attempting to use Splunk to remove the Oracle WebLogic files that are filling up our harddrive.&lt;/P&gt;&lt;P&gt;I have been able to remove other files with a different filename format using the batch command.&lt;/P&gt;&lt;P&gt;But... the following stanza is not working&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[batch://C:\Oracle\config\domains\csel\servers\...\DefaultAuditRecorder.*.log]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The filename format is: DefaultAuditRecorder.############.log&lt;/P&gt;&lt;P&gt;where # is a number&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2023 01:36:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Batch-file-Input-not-removing-files/m-p/670917#M112475</guid>
      <dc:creator>kenoski</dc:creator>
      <dc:date>2023-12-06T01:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: Batch file Input not removing files.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Batch-file-Input-not-removing-files/m-p/671068#M112499</link>
      <description>&lt;P&gt;Does the account running Splunk have permission to delete the files?&amp;nbsp; Are there any messages in splunkd.log about the files?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2023 19:18:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Batch-file-Input-not-removing-files/m-p/671068#M112499</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-12-06T19:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: Batch file Input not removing files.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Batch-file-Input-not-removing-files/m-p/671459#M112538</link>
      <description>&lt;P&gt;There is no problem with removing files from the directory. Other files are being removed using batch.&lt;/P&gt;&lt;P&gt;This appears to be a regular expression processing issue.&lt;/P&gt;&lt;P&gt;SplunkD log shows the watch being put on the path, and processes the stanzas that relate to the files in question.&lt;/P&gt;&lt;P&gt;The file I want to monitor has the filename of DefaultAuditRecorder.log.&lt;/P&gt;&lt;P&gt;The files I want to use batch on have the form of DefaultAduitRecorder.############.log&lt;/P&gt;&lt;P&gt;The automatic Splunk conversion to Regular expression can't differentiate between these tow filename formats, and defaults to monitor.&lt;/P&gt;&lt;P&gt;I have tried several attempts to working on a whitelist regular expression for the monitor and batch, but it still doesn't work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2023 16:39:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Batch-file-Input-not-removing-files/m-p/671459#M112538</guid>
      <dc:creator>kenoski</dc:creator>
      <dc:date>2023-12-11T16:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: Batch file Input not removing files.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Batch-file-Input-not-removing-files/m-p/671480#M112548</link>
      <description>&lt;P&gt;Read the inputs.spec carefuly &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;* This stanza must include the 'move_policy = sinkhole' setting.
* This input reads and indexes the files, then DELETES THEM IMMEDIATELY.&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 Dec 2023 20:55:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Batch-file-Input-not-removing-files/m-p/671480#M112548</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2023-12-11T20:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: Batch file Input not removing files.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Batch-file-Input-not-removing-files/m-p/671486#M112551</link>
      <description>&lt;P&gt;I use the move_policy. I have tried the following, and it acts the same way.&lt;/P&gt;&lt;P&gt;To monitor for log files I have this in inputs.conf&lt;/P&gt;&lt;P&gt;[monitor://C:\Oracle\config\domains\csel\servers\...\logs\*.logs]&lt;/P&gt;&lt;P&gt;I have tried both of the following to batch the archived files.&lt;/P&gt;&lt;P&gt;1st try:&lt;/P&gt;&lt;P&gt;[batch://C:\Oracle\config\domains\csel\servers\...\DefaultAuditRecorder\[0-9]*.log]&lt;BR /&gt;move_policy = sinkhole&lt;BR /&gt;crcSalt = &amp;lt;SOURCE&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2nd try:&lt;/P&gt;&lt;P&gt;[batch://C:\Oracle\config\domains\csel\servers\...\]&lt;BR /&gt;whitelist = /DefaultAuditRecorder\.[0-9]+\.log$&lt;BR /&gt;move_policy = sinkhole&lt;BR /&gt;crcSalt = &amp;lt;SOURCE&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I even tried to blacklist the monitor stanza for the files I whitelist in the batch&lt;/P&gt;&lt;P&gt;[monitor://C:\Oracle\config\domains\csel\servers\...\]&lt;BR /&gt;blacklist = /DefaultAuditRecorder\.[0-9]+\.log$&lt;/P&gt;&lt;P&gt;Splunk still seems to try and monitor these files, and not batch them.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2023 22:14:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Batch-file-Input-not-removing-files/m-p/671486#M112551</guid>
      <dc:creator>kenoski</dc:creator>
      <dc:date>2023-12-11T22:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: Batch file Input not removing files.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Batch-file-Input-not-removing-files/m-p/671490#M112553</link>
      <description>&lt;P&gt;1. Did you check&lt;/P&gt;&lt;PRE&gt;splunk list monitor&lt;/PRE&gt;&lt;P&gt;and&lt;/P&gt;&lt;PRE&gt;splunk list inputstatus&lt;/PRE&gt;&lt;P&gt;2. This might not be related but batch input does not have crcSalt parameter (it makes no sense in batch input context at all).&lt;/P&gt;&lt;P&gt;3. Ok, so you have two separate file inputs covering the same path? That might be the problem.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2023 22:42:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Batch-file-Input-not-removing-files/m-p/671490#M112553</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2023-12-11T22:42:08Z</dc:date>
    </item>
  </channel>
</rss>

