Getting Data In

Is there a way to check if Splunk is re-indexing certain files?

att35
Builder

Hi,

We use Splunk Forwarder to monitor application data. There are multiple folders on a given server, each with same set of log files, but since the folder names are a distinguishing factor, we are using crcSalt=<SOURCE> so that Splunk treats all log files differently. 

We also make sure to lock the stanza to a specific extension as needed, e.g. logname.log, or log*.txt, so that rotated files are ignored.

That being said, I still want to find out if there are any situations where splunk could be re-indexing files multiple times and might warrant the use of initCrcLen instead. 

Is this something that's possible via search? Does Splunk forwarder keeps some type of internal record/tracker that it is now re-indexing previously seen file again?

Thanks,

Labels (3)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @att35 ,

for my knowledge, Splunk doesn't index twice a file, unless you use crcSalt=<SOURCE>.

In this case the file name (and not the content) guides the indexeing, but  two files with the same name (path and filename) cannot be indexed twice.

You can check if you have duplicated logs from the same file with a simple search like the following:

index=*
| stats dc(_raw) AS raw_count BY source
| where raw_count>1

Ciao.

Giuseppe

isoutamo
SplunkTrust
SplunkTrust
If you find reindexed files/events this usually means that someone have removed splunk UF installation and reinstall it. Actually that means removing for _fishbucket directory on UF.
0 Karma
Get Updates on the Splunk Community!

Brains, Bytes, and Boston: Learn from the Best at .conf25

When you think of Boston, you might picture colonial charm, world-class universities, or even the crack of a ...

Splunk AppDynamics Agents Webinar Series

Mark your calendars! On June 24th at 12PM PST, we’re going live with the second session of our Splunk ...

SplunkTrust Application Period is Officially OPEN!

It's that time, folks! The application/nomination period for the 2025 SplunkTrust is officially open! If you ...