Getting Data In

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

deepthi5
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)

Thanks
Deepthi

Tags (3)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

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, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...