Getting Data In

Using a field within a log for the true timestamp

aferone
Builder

Here si the example log:

Sep 1 11:23:48 HOSTNAME netflow: timestamp=2016-08-30T12:51:07.593 duration=1.246 proto=6 srcip=1.1.1.1 srcport=80 dstip=2.2.2.2 dstport=62018 inpkt=5 inbyte=724 outpkt=6 outbyte=815 fl=2

The fieldname "timestamp" is the true timestamp of the event. The first date in the log is just when the netflow data was converted.

How do I use "timestamp" as the Splunk date/time? I know how to do timestamps when the times are the first part of the log, but not within it.

Thanks!

0 Karma
1 Solution

sundareshr
Legend

The below config in your props.conf on the indexer/hf should do the trick

[unique_stanza_name]
 TIME_PREFIX = timestamp=
 TIME_FORMAT = %Y-%m-%dT%H:%M:%S.%3N

Verify correct stanza name, restart splunk service on indexer. All new data will have this field value for _time

View solution in original post

sundareshr
Legend

The below config in your props.conf on the indexer/hf should do the trick

[unique_stanza_name]
 TIME_PREFIX = timestamp=
 TIME_FORMAT = %Y-%m-%dT%H:%M:%S.%3N

Verify correct stanza name, restart splunk service on indexer. All new data will have this field value for _time

aferone
Builder

Works like a champ! Thanks for responding!

0 Karma
Get Updates on the Splunk Community!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

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