Getting Data In

How to make "_indextime" as the time format for the event?

koshyk
Super Champion

hi
I've got some data in below format

SI01,2019-03-14,00:01:00,line1,somedata
SI02,2019-03-14,00:02:00,line2,somedata
SI03,2019-03-14,00:03:00,line3,somedata

I indexed the events say at 2019-03-14:10:00:00am
I want to use the "indexed" time for the events and NOT the 2nd/3rd field, but Splunk automatically extracts the time from 2nd/3rd fields. in props.conf , how would i ensure Splunk uses the indexed time?

tried below config, but still doesn't work

[mysourcetype]
SHOULD_LINEMERGE=false
# need indextime here
#TIME_FORMAT=%Y/%m/%d,%H:%M:%S
#TIME_PREFIX = ^\w+,
LINE_BREAKER = ([\r\n]+)
#MAX_TIMESTAMP_LOOKAHEAD = 1
TRUNCATE = 50000
0 Karma
1 Solution

p_gurav
Champion

Hi koshyk,

Please try below:

 [mysourcetype]
 SHOULD_LINEMERGE=false
 DATETIME_CONFIG = CURRENT
 LINE_BREAKER = ([\r\n]+)
 TRUNCATE = 5000

View solution in original post

p_gurav
Champion

Hi koshyk,

Please try below:

 [mysourcetype]
 SHOULD_LINEMERGE=false
 DATETIME_CONFIG = CURRENT
 LINE_BREAKER = ([\r\n]+)
 TRUNCATE = 5000

koshyk
Super Champion

cheers. it worked. upvoted & accepted.

0 Karma

nickhills
Ultra Champion

It is worth considering if you want to use 'CURRENT' or 'NONE'
Current will use the indextime (which is what the question asked), however in some cases you may wish to use the modified time of the file, or the time which the forwarder received the data. In these cases you may choose 'NONE'.
There could of course be a few ms-minutes between these times.
See: https://docs.splunk.com/Documentation/Splunk/7.2.4/Admin/Propsconf#Timestamp_extraction_configuratio...

If my comment helps, please give it a thumbs up!
0 Karma
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...