Getting Data In

How to update props.conf to extract timestamp from my sample data?

sravankaripe
Communicator

Please help me with props.conf file i have sample data below i want to extract time stamp from the below sample data.

BREAK_ONLY_BEFORE=
TIME_PREFIX=
TIME_FORMAT=

10.123.123.12 - - [02/Nov/2016:00:36:31 -0500] "POST /comp/apps/services/api/comp/iphone/init HTTP/1.1" 123 12345 1234 WAS=abc-abcdef12-xzy12.maps.ib:1234 TMS=12345 T=0 "-" "comp/7.0.26 (iPhone; iOS 10.0.1; Scale/2.00),comp/7.0.26 (iPhone; iOS 10.0.1; Scale/2.00)/somexzyAPI/7.0.0.0" "-" JSessionID=1234aLpYQEcNOxbnZeE7eCMv5zO:mfp-wlprod12-abc01-MfpProdSrv12 "-"
0 Karma
1 Solution

somesoni2
Revered Legend

Try this for your sourcetype definition/props.conf

[yoursourcetype]
SHOULD_LINEMERGE=false
LINE_BREAKER = ([\r\n]+)(?=\d+\.\d+\.\d+\.\d+\s+)
TIME_PREFIX = ^(\S+\s+){3}\[
TIME_FORMAT = %d/%b/%Y:%H:%M:%S %z
MAX_TIMESTAMP_LOOKAHEAD = 26

View solution in original post

0 Karma

dmaislin_splunk
Splunk Employee
Splunk Employee
SHOULD_LINEMERGE=false
NO_BINARY_CHECK=true
TIME_FORMAT=%d/%b/%Y:%H:%M:%S %z
TIME_PREFIX=\[
MAX_TIMESTAMP_LOOKAHEAD=26
CHARSET=UTF-8
0 Karma

sravankaripe
Communicator

thanks sir this is also working.

0 Karma

somesoni2
Revered Legend

Try this for your sourcetype definition/props.conf

[yoursourcetype]
SHOULD_LINEMERGE=false
LINE_BREAKER = ([\r\n]+)(?=\d+\.\d+\.\d+\.\d+\s+)
TIME_PREFIX = ^(\S+\s+){3}\[
TIME_FORMAT = %d/%b/%Y:%H:%M:%S %z
MAX_TIMESTAMP_LOOKAHEAD = 26
0 Karma

dbcase
Motivator

I had the same question just last week. Somesoni2's answer worked for me 🙂

0 Karma

sravankaripe
Communicator

thanks its working

0 Karma

skoelpin
SplunkTrust
SplunkTrust

Try this

[YOUR_SOURCETYPE]
TIME_PREFIX = ^
TIME_FORMAT = %Y-%m-%d %H:%M:%S,$3N
0 Karma
Get Updates on the Splunk Community!

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...

Data Management Digest – November 2025

  Welcome to the inaugural edition of Data Management Digest! As your trusted partner in data innovation, the ...