Getting Data In

timestamp recognition for elb logs


I am trying to input ELB logs that are being provided to me in the following format:

elb-instance-hostname [02/10/2012:17:59:37.430204 -0000] 0.000046/0.148519/0.000025 200 200 0 3 "GET HTTP/1.1"

Splunk is having a hard time automatically recognizing the timestamp, and as such is storing the events in the index with the incorrect date.

How would the TIME_FORMAT need to look for these events, to properly parse the timestamps?

Tags (1)


I would try the following in your props.conf stanza for this sourcetype:

TIME_FORMAT = %m/%d/%Y:%H:%M:%S.%6 %z

You can also give it some more flags to narrow down the scope of where it looks for timestamps:


(The first '[' seen indicates that the timestamp starts on the next character)


(The max number of characters it will scan past the time_prefix to extract the timestamp. Handy for performance reasons if some events are exceptionally long. In this case, your timestamp is always 32 characters long so you can get specific here)

I also find the following helpful when building strptime:

Get Updates on the Splunk Community!

.conf24 | Day 0

Hello Splunk Community! My name is Chris, and I'm based in Canberra, Australia's capital, and I travelled for ...

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

 (view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...