Getting Data In

How to index data from the directory based on the log created date in SPLUNK?

Path Finder

Hi Team,

I have a couple of logs to be monitored daily from a directory called LOG. The log name is error log.0, error log.1, and so on, where 0 means Sunday , 1 -->Monday etc. After 7 days, the logs will be automatically deleted from the directory.

Can someone suggest the search command to execute this? I have tried error log.* which will index all logs daily (unnecessary action)


Tags (3)
0 Karma


If you use "log.*" Splunk will indeed index all seven logs the first day, but after that should recognize that some files haven't changed and not re-index them.

If this reply helps you, an upvote would be appreciated.
0 Karma
*NEW* Splunk Love Promo!
Snag a $25 Visa Gift Card for Giving Your Review!

It's another Splunk Love Special! For a limited time, you can review one of our select Splunk products through Gartner Peer Insights and receive a $25 Visa gift card!


Or Learn More in Our Blog >>