Getting Data In

At what point in the batch Input process is a file deleted?

chintu_jain
Explorer

I am doing some testing on batch inputs and trying to find out when the batch input deletes a file. Does it immediately delete it after indexing or does it wait for all the inputs (sending data to same index) to be completed before deleting?

For example, if i create hundreds of stanzas in inputs.conf (for Folder1, Folder 2 and so on) such as below, will the files be deleted immediately after indexing or will Splunk wait for all the stanzas (sending data to same index) to be indexed before deleting the files?

  ```
[batch:///cslbuckets/Folder1] 
disabled = false 
recursive = true 
index = aws-cloudtrail-splunk 
sourcetype = aws:cloudtrail 
initCrcLength = 2048 
crcSalt =  
move_policy = sinkhole 

[batch:///cslbuckets/Folder2] 
disabled = false 
recursive = true 
index = aws-cloudtrail-splunk 
sourcetype = aws:cloudtrail 
initCrcLength = 2048 
crcSalt =  
move_policy = sinkhole
```
0 Karma

VatsalJagani
SplunkTrust
SplunkTrust

Hi @chintu_jain,

batch stanza of inputs.conf DELETES THEM IMMEDIATELY, and that is also mentioned in the documentation of inputs.conf, you can search and read that.

0 Karma

chintu_jain
Explorer

I have created a batch input for hundreds of stanzas monitoring millions of files and i am seeing that the files are not being deleted. The splunkd process is crashing probably due to monitoring and indexing millions files on a single instance. I believe that the files will not be deleted immediately but splunk will wait for all the inputs (loaded onto memory ?) to be completed. I am unable to verify this myself at the moment as splunkd is crashing before all the files are indexed.

0 Karma

VatsalJagani
SplunkTrust
SplunkTrust

Splunk instance should have enough resource configuration as you have hundreds of inputs.

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...

Updated Data Management and AWS GDI Inventory in Splunk Observability

We’re making some changes to Data Management and Infrastructure Inventory for AWS. The Data Management page, ...