Getting Data In

Having difficulties with a date/time conversion?

NanSplk01
Path Finder

I have been trying to create this sourcetype and am not sure I'm capturing it correctly.  

 

Sample date:      [2023-03-26T14:06:06.356-04:00]

Regex Breakdown:    \[\d{4}-\d{2}-\d{2}.\d{2}:\d{2}:\d{2}.\d{3}-\d{2}:\d{2}]

Timestamp:    %Y-%m-%d{2}\T\d{2}:%H%:%M.%S.%N-\d{2}:\d{2}

But I'm having issues with the timestamp value.  I've not run into one that has no breaks in it before.  Any help will be much appreciated.

Labels (2)
0 Karma

yeahnah
Motivator

Hi @NanSplk01 

 The regex looks OK, but time format variables used are wrong.  Here's the Splunk doc ref

https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Commontimeformatvariables

This should work for you

Timestamp: %Y-%m-%dT%H:%M:%S.%3N%z

Hope that helps 

Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...