Getting Data In

Wildcard magic in monitor stanzas- Need help with inputs.conf

vgrote
Path Finder

Hi,

we have a directory with daily log files I want to read into Splunk 8.1.5:

/dir1/dir2/dir3/dir4/file-20220309.log, file-20220308.log, ...

Version A, working: "[monitor:///dir1/dir2/dir3/dir4]"

Version B, working: "[monitor:///dir1/*/d*/dir4/*]"

Version C, failing: "[monitor:///dir1/*/d*/dir4]"

Version C would in theory match the example of "[monitor:///apache/*/logs]" in the documentation, wouldn't it? That is, as long as "logs" is a directory.

Do I miss something here? Do I see a bug? Is there a limit on the number of wildcards in a path?

Puzzled in Hamburg

Volkmar

Labels (2)
0 Karma

SanjayReddy
SplunkTrust
SplunkTrust

Hi @vgrote 


for Version C,"[monitor:///dir1/*/d*/dir4]"

can you please share the exact location for  [monitor:///apache/*/logs] 

and have you tried using (...) intead of * 

0 Karma

vgrote
Path Finder

Hello SanjayReddy,

" [monitor:///apache/*/logs] " is mentioned as an example in https://docs.splunk.com/Documentation/Splunk/8.1.5/Data/Specifyinputpathswithwildcards#Input_example....

"/.../" would recurse into all subdirectories, which could be quite a long journey leading potentially across unknown directory structures, plus I got version B working anyhow which is probably taking less time.

I just wonder if it works as documented.

Kind Regards,

Volkmar

0 Karma
Get Updates on the Splunk Community!

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...