Getting Data In

How to check for files that are indexed multiple times

lakshman237
Path Finder

Greetings.,

I have universal forwarders reading files from a common directory, with whitelists. I have reviewed the monitor stanza and couldn't see the likelyhood of samefile being indexed twice.

Is there a way to find same files being indexed more than once from the indexer?

thanks
laks

Tags (2)
0 Karma

kristian_kolb
Ultra Champion

Depending on how unique your messages are, you could always try

...| stats count last(source) AS dup_file by _raw | search count > 1 | table dup_file 

if you get any results, you will likely have indexed the same event/file more than once.
The results will be rather simplistic, but...it might help.

_raw is the whole event, including its timestamp, which should be fairly unique in combination with the rest of the event text.

Please not that it may take some time, since splunk will have to go through all events. Some further qualification (sourcetype, host etc) may be necessary to speed things up.

/k

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!

.conf25 Global Broadcast: Don’t Miss a Moment

Hello Splunkers, .conf25 is only a click away.  Not able to make it to .conf25 in person? No worries, you can ...

Observe and Secure All Apps with Splunk

 Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What's New in Splunk Observability - August 2025

What's New We are excited to announce the latest enhancements to Splunk Observability Cloud as well as what is ...