Getting Data In

I moved source data, they are not reindexed

wsw70
Communicator

Hello

I have two directories dir1 and dir2 monitored by splunk, new files in each directory are indexed, respectively, to index1 and index2.

I realized that I made a mistake and put myfile.txt in dir1 instead of dir2. The events within were indexed to index1, which is not a problem (I will deal with them later).

I then moved the file via mv dir1/myfile.txt dir2, the move was successful, I can now see myfile.txt in dir2 but the events are not visible in index2. Other files which are in this directory are indexed correctly, so indexing as it works fine.

Why moving the file did not trigger the indexing? From the standpoint of index2 these are new files and the fact that they have been previously indexed to index1 should not make any difference, right?

0 Karma
1 Solution

gfuente
Motivator

Hello

by default Splunk doesn´t use the path of the file to identify if the file has been already indexed. You have two options, make an small modification at the beggining of the file or add:

crcSalt = <SOURCE>

To your inputs.conf stanza.

Regards

View solution in original post

gfuente
Motivator

Hello

by default Splunk doesn´t use the path of the file to identify if the file has been already indexed. You have two options, make an small modification at the beggining of the file or add:

crcSalt = <SOURCE>

To your inputs.conf stanza.

Regards

wsw70
Communicator

Thank you very much (I actually cat'ed the ones which were copied by mistake to a new one and that new one got immediately indexed).

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...