Getting Data In

Splunk - Assigning custom time

gunnist
Explorer

I want my time to be the "Date" property in the following json:

{ "Level": "ERROR", "Date": "2021-08-20 17:21:53.6355", "Logger":.... }

I created a props.conf here: ...\Splunk\etc\system\local with:

TIME_PREFIX = "Date":\s"
TIME_FORMAT = %Y-%m-%d %H:%M:%S.%4N

I then restarted splunk...but it's not working. Any idea what I'm missing?

Labels (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

The current settings say Splunk should find a 4-digit year immediately following '"Date":', but that's not the case. Try TIME_PREFIX = "Date":\s". There's no need to escape the quotation marks.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...