Getting Data In

How to monitor multiple files across multiple subdirectories

slrobeson
Engager

We are new to Splunk and are trying it before we buy it. I am having trouble getting Splunk to monitor the individual log files that capture transaction data, of which there is one for each register in each store, and each store has its own subdirectory off of the main directory.

All of the files in question are named ####_#_scanLog, where #### is the store number and # is the terminal number. Each store's files are in a directory named ####_scanLogs, where, again, the #### is the store number. I have tried the following in inputs.conf, and none have worked:

[monitor:///usr/local/copient/logs/*_scanLogs]
disabled = false
index = transactions
sourcetype = scanlog
crcSalt = <SOURCE>

[monitor:///usr/local/copient/logs/*_scanLogs/*_scanLog]
disabled = false
index = transactions
sourcetype = scanlog
crcSalt = <SOURCE>

[monitor:///usr/local/copient/logs/]
disabled = false
index = transactions
sourcetype = scanlog
crcSalt = <SOURCE>
whitelist = *_scanLog

[monitor:///usr/local/copient/logs/]
disabled = false
index = transactions
sourcetype = scanlog
crcSalt = <SOURCE>

None of these have worked. In addition to this monitoring stanza, we also have two others which monitor specific files within the logs directory, and these work fine.

Any ideas would be appreciated.

Tags (2)
0 Karma
1 Solution

javiergn
Super Champion

What about:

[monitor:///usr/local/copient/logs/.../*_scanLog]
disabled = false
index = transactions
sourcetype = scanlog

Note that I've removed the crcSalt.

View solution in original post

javiergn
Super Champion

What about:

[monitor:///usr/local/copient/logs/.../*_scanLog]
disabled = false
index = transactions
sourcetype = scanlog

Note that I've removed the crcSalt.

Get Updates on the Splunk Community!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...