Getting Data In

Can symlink cause Splunk to index files twice?

mfeeny1
Path Finder

Due to some inconsistencies in how some of our servers use Symbolic Links (symlinks), we need to understand how Splunk would handle the following situation...

/usr2/wlp_logs is a symlink pointing to /hosting/logs.

If we have the following 2 monitor stanzas in inputs.conf...

[monitor:///usr2/wlp_logs/blah/myapp.log]

[monitor:///hosting/logs/blah/myapp.log]

...would Splunk recognize that these are 2 references to the same file, and index it only once? Or, would myapp.log get indexed twice?

Thx for any clarification / enlightenment.

mfeeny1

Tags (2)

jrodman
Splunk Employee
Splunk Employee

Symbolic links cannot cause splunk to index files twice, unless you make use of crcSalt to force splunk to consider files different via their filenames.

Monitoring both the symbolic link and the target of the link is not a good practice however. You will get uncertain behavior as to which name splunk finds the data under.

cramasta
Builder

Would like to know this as well.

0 Karma
Get Updates on the Splunk Community!

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...