Splunk Search

extracting year from directory name & date/time from file

pljulien
New Member

I have syslog files that are in the directory structure of system/Hosts/year/month/day

I've been able to get the indexer to list the file date as date time (Aug 13 2:00:01) based on input to props.conf.

What I would really like to do is combine the year directory name combined with the date time (2013 Aug 13 2:00:01). Can anyone tell me if this is possible and if so how to do it. Without the year I'm not sure how I would be able to search for events happening at specific year month day

TIA
PJ

0 Karma

omniit
Explorer

You should be able to setup a regex for this. I am no specialist in this area, but I am certain that you could filter out a part of the pathname (e.g. the year, or the month, or both) and use it for whatever you would like.

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

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 ...