Getting Data In

Index organization for large number of files

deanx
New Member

We have 14 directories of log files which contain ~3,100 files. Each day the logs are rotated and 3,100 new files are created with wholly new filenames (eg: Job_ACCOUNTS_PAYABLE_DM_0298.log becomes Job_ACCOUNTS_PAYABLE_DM_0299.log). There might be >300 differently named files like this in each directory.

I am trying to make some order out of this when it gets indexed. The best idea I have come up with is to send each of the different directories as a different sourcetype. That helps, but not entirely .. but it is still alot of sources and I am wondering if others have found a better way?

The application produces these files this way and can not be altered, so I am hoping a good index strategy would help.

Tags (2)
0 Karma

Runals
Motivator

Through your props and transforms you could have each of those write to separate sourcetypes- especially if they follow that same general structure. Job_(sourcetype)_\d+.log. I think the bigger question is how different those files really are and how are they going to be used. You could look at doing eventtypes as a way to do high level categorization as well.

0 Karma

ShaneNewman
Motivator

We only index the most current log file, avoiding the need to do what you are having to do... You should not need to add different sourcetypes to each, especially if they are all the same sourcetype at the end of the day. If you are looking for a way to distinguish them, I would use regex on the source to extract host and other distinguishable fields.

0 Karma
Get Updates on the Splunk Community!

Database Performance Sidebar Panel Now on APM Database Query Performance & Service ...

We’ve streamlined the troubleshooting experience for database-related service issues by adding a database ...

IM Landing Page Filter - Now Available

We’ve added the capability for you to filter across the summary details on the main Infrastructure Monitoring ...

Dynamic Links from Alerts to IM Navigators - New in Observability Cloud

Splunk continues to improve the troubleshooting experience in Observability Cloud with this latest enhancement ...