Getting Data In

What do we need to write in TIME_FORMAT in props.conft to extract a timestamp?

vishaltaneja070
Motivator

How do you extract a timestamp in an event like this "2018-12-05T00:31:03.711Z"?

Like, what do we need to write in TIME_FORMAT in props.conf?

Tags (1)
0 Karma
1 Solution

prakash007
Builder

Hope this should work..

[<sourcetype>]
SHOULD_LINEMERGE = false
TIME_PREFIX = ^\"
TIME_FORMAT = %Y-%m-%dT%H:%M:%S.%3N%Z
MAX_TIMESTAMP_LOOKAHEAD = 25

View solution in original post

whrg
Motivator

Hi @vishaltaneja07011993! Can you post one whole event? Because it matters where the timestamp is situated in the event and you might need to configure TIME_PREFIX accordingly.

0 Karma

skoelpin
SplunkTrust
SplunkTrust

I think you're asking how Splunk identifies the timestamp in the raw logs rather than how Splunk extracts it

0 Karma

prakash007
Builder

Hope this should work..

[<sourcetype>]
SHOULD_LINEMERGE = false
TIME_PREFIX = ^\"
TIME_FORMAT = %Y-%m-%dT%H:%M:%S.%3N%Z
MAX_TIMESTAMP_LOOKAHEAD = 25

bjoernjensen
Contributor

Hey,

Splunk should handle that automatically:

alt text

What exactly is not working at your side?

0 Karma

woodcock
Esteemed Legend

No, no, no! Never, EVER let Splunk do anything related to timestamping or sourcetyping automatically!

skoelpin
SplunkTrust
SplunkTrust

Correct. ALWAYS explicitly tell Splunk how to line break and timestamp

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