Splunk Search

wildcards and inputs.conf -- directory recursion

Steve_G_
Splunk Employee
Splunk Employee

Trying to understand exactly how directory recursion works in inputs.conf.

Specifically, how does /foo/.../.../.log resolve? Does it recurse through the same set of directories as /foo/.../.log ?

Also, can you use "*" in a directory segment to narrow things down a bit? For example: /foo/b*r/.log instead of /foo/.../.log ?

Tags (1)
1 Solution

bwooden
Splunk Employee
Splunk Employee

Yes, monitoring...

/foo/.../.../.log

would monitor .log as would the preferred

/foo/.../.log

Additionally, you can use an asterisk within a path as you reference in

/foo/b*r/.log

...to monitor either /foo/bar/.log or /foo/banbar/.log but neither /foo/bar/lorem/.log nor /foo/lorem/bar/.log

The reason is that 3 consecutive dots represent recursing through any number of directories while an asterisk is a wildcard.

View solution in original post

bwooden
Splunk Employee
Splunk Employee

Yes, monitoring...

/foo/.../.../.log

would monitor .log as would the preferred

/foo/.../.log

Additionally, you can use an asterisk within a path as you reference in

/foo/b*r/.log

...to monitor either /foo/bar/.log or /foo/banbar/.log but neither /foo/bar/lorem/.log nor /foo/lorem/bar/.log

The reason is that 3 consecutive dots represent recursing through any number of directories while an asterisk is a wildcard.

Get Updates on the Splunk Community!

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...