Getting Data In

Does batch input ignore files already read?

Jason
Motivator

I have a file in a folder that is being monitored by Splunk. Its contents have been indexed. If I move that file into a batch input (read-and-delete), will the file be re-indexed, or will Splunk know it has already indexed this data already?

(The specific scenario is I am changing a folder from monitor:// to batch:// and need to know if I need to remove all the files first to avoid data duplication in Splunk.)

Tags (3)
1 Solution

jbsplunk
Splunk Employee
Splunk Employee

so long as the policy is set to move to the sinkhole, Splunk should eat the file again.
The input could look something like this:

[batch:///some/path/some_file]
move_policy = sinkhole

without the move_policy = sinkhole setting, it won't load the files destructively and will keep track of them.

Hope this helps!

View solution in original post

jbsplunk
Splunk Employee
Splunk Employee

so long as the policy is set to move to the sinkhole, Splunk should eat the file again.
The input could look something like this:

[batch:///some/path/some_file]
move_policy = sinkhole

without the move_policy = sinkhole setting, it won't load the files destructively and will keep track of them.

Hope this helps!

Jason
Motivator

Confirmed - Splunk does no checking and will re-index the file.

Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...