Getting Data In

Mapping date from big file with date format in epoch milliseconds.

brent_weaver
Builder

I have a nice CEF file that parses quite nicely except the date is burred deep in the file and is in epoch milliseconds. The field name is start, how do I make that my datetime stamp when this indexes.

Thanks!

Tags (1)
0 Karma
1 Solution

inventsekar
SplunkTrust
SplunkTrust

if your data timestamp, for example -

TIME:1459495744806

To extract that timestamp, add this stanza in props.conf:

[host::foo]
TIME_PREFIX = TIME:
TIME_FORMAT=%s%3N

%s -- for Epoch (10 digits) and %3N for milli-seconds

http://docs.splunk.com/Documentation/Splunk/6.4.3/Data/Configuretimestamprecognition

if you are having "1459495744806" inside an event and query and convert it to required timestamp -

| makeresults | fields - _time | eval timeTest = "1474993609302"
 | eval timeStamp=strptime(timeTest,"%s%3N") 
 | eval timeStamp=strftime(timeStamp,"%m/%d/%Y:%H:%M:%S") 
| table timeStamp

alt text

View solution in original post

0 Karma

inventsekar
SplunkTrust
SplunkTrust

if your data timestamp, for example -

TIME:1459495744806

To extract that timestamp, add this stanza in props.conf:

[host::foo]
TIME_PREFIX = TIME:
TIME_FORMAT=%s%3N

%s -- for Epoch (10 digits) and %3N for milli-seconds

http://docs.splunk.com/Documentation/Splunk/6.4.3/Data/Configuretimestamprecognition

if you are having "1459495744806" inside an event and query and convert it to required timestamp -

| makeresults | fields - _time | eval timeTest = "1474993609302"
 | eval timeStamp=strptime(timeTest,"%s%3N") 
 | eval timeStamp=strftime(timeStamp,"%m/%d/%Y:%H:%M:%S") 
| table timeStamp

alt text

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