Getting Data In

Help with timestamp and time_prefix

a212830
Champion

Hi,

I'm having some issues getting a feeds timestamp picked up properly. The date field comes in like this: "date": "8/15/2019 10:55:16 AM". My props has this, which isn't working.

TZ = UTC
TIME_FORMAT = %m/%d/%Y %I:%M:%S %p
TIME_PREFIX = "date": "
0 Karma

sloshburch
Ultra Champion

Give a btool output of the props.conf so we can see what's really happening. I'm guessing the above is from the props.conf without btool.

0 Karma

woodcock
Esteemed Legend

You need this for props.conf:

TZ = UTC
TIME_PREFIX = "date":\s+"
TIME_FORMAT = %m/%d/%Y %I:%M:%S %p

Your settings are fine so it must be something else. If you are doing a sourcetype override/overwrite, you must use the ORIGINAL value, NOT the new value. You must deploy your settings to the first full instance(s) of Splunk that handle the events (usually either the HF tier if you use one, or else your Indexer tier), restart all Splunk instances there, send in new events (old events will stay broken), then test using _index_earliest=-5m to be absolutely certain that you are only examining the newly indexed events.

0 Karma

Sukisen1981
Champion

date i coming as per the format specified, how would you like to see the date?

0 Karma

a212830
Champion

It's not taking that date as the event date - looks like it's taking the system date on the server.

0 Karma

Sukisen1981
Champion

have you set the spec?
[]
DATETIME_CONFIG =
TIME_PREFIX =
MAX_TIMESTAMP_LOOKAHEAD =
TIME_FORMAT =
TZ =
MAX_DAYS_AGO =
MAX_DAYS_HENCE =
MAX_DIFF_SECS_AGO =
MAX_DIFF_SECS_HENCE =

In this syntax, can be:

, the source type of an event.
host::, where is the host value for an event.
source::, where is the source value for an event.

https://docs.splunk.com/Documentation/Splunk/7.3.1/Data/Configuretimestamprecognition

0 Karma

a212830
Champion

I have what's listed above, which works most of the time. Trying to determine if something there is wrong, especially since the time prefix includes quotes.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Turn Cisco Telemetry Into Action with Cisco Data Fabric, powered by the Splunk ...

The surge in machine data is already hitting enterprise budgets, and the agentic era will only intensify it. ...

Persistent Queue at TcpOut — One of Splunk's Most Practical Features

Splunk introduced persistent queueing at the tcpout layer as one of the most practical resilience features in ...

Skip the Awkward Silence: Have a .conf-ersation at .conf26

Picture this. You arrive at .conf26 already having your socializing and networking plans mapped out. No ...