Getting Data In

If I have two timestamps in my log file, how can I choose one timestamp as the timestamp of the event?

manikantakomura
New Member

I have two timestamps in my log as shown below:

"#01#20180626-125301;969#19700101-000028;723#0046#01#GROUND#Y#4Y1651"

My sourcetype is written in a way to pick up the second timestamp within 5000 days. Now, since the date in the above example is 19700101, it attached the indexation time as the timestamp of the event. But is there a way to select the first time as the timestamp of the event when my second timestamp is invalid?

0 Karma

sudosplunk
Motivator

If you believe first timestamp is accurate at all times, then configure splunk to look at only first timestamp. Add below to your props.conf,

Assuming, timestamp always starts with "#<int>#

[sourcetype]
TIME_PREFIX = \"\#\d+\#
TIME_FORMAT = %Y%m%d-%H%M%S
MAX_TIMESTAMP_LOOKAHEAD = 15

manikantakomura
New Member

Thanks for your answer, but my first timestamp isn't accurate always. I only want to use the first timestamp when my second timestamp reads 1970

0 Karma
Get Updates on the Splunk Community!

Your Guide to Splunk Digital Experience Monitoring

A flawless digital experience isn't just an advantage, it's key to customer loyalty and business success. But ...

Data Management Digest – November 2025

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

Upcoming Webinar: Unmasking Insider Threats with Slunk Enterprise Security’s UEBA

Join us on Wed, Dec 10. at 10AM PST / 1PM EST for a live webinar and demo with Splunk experts! Discover how ...