Getting Data In

Monitoring an entire folder with yesterday flagged files

royimad
Builder

Hello Splunk Experts,

I have a folder that i need to monitored entirely:
the folder contains a list that is represented by the following:

namefile1_yyyymmdd.csv
namefile2_yyyymmdd.csv
namefile3_yyyymmdd.csv

each day this folder will contains CSV's from yesterday,
How splunk could monitor automatically such folder?

Thanks,

0 Karma

royimad
Builder

vi inputs.conf
[monitor:///home/splunk/devicescollect/AgentsReads]
disabled = false
followTail = 0
host = dcpcontroller.wavemark.net
sourcetype = AgentsReads
crcSalt=
[monitor:///home/splunk/devicescollect/DevicesReads]
disabled = false
followTail = 0
host = dcpcontroller.wavemark.net
sourcetype = DevicesReads
crcSalt=
[monitor:///home/splunk/devicescollect/DevicesInfo]
disabled = false
followTail = 0
host = dcpcontroller.wavemark.net
sourcetype = DevicesInfo
crcSalt=

The above line will tell splunk to monitor the entire directory , there are mainly 3 directories created ( folders)
-AgentsReads
-DevicesReads
-DevicesInfo

0 Karma

royimad
Builder

I need from splunk to monitor only files of yesterday in that folder to reduce CPU consumption. I found that i can use ignoreOlderThan =

0 Karma

kristian_kolb
Ultra Champion

With an ordinary [monitor:///path/to/files]. Splunk will read all the files in the directory by default.

0 Karma

Ayn
Legend

Not sure I understand the problem - what's stopping you from simply monitoring the directory?

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...