Splunk Search

Index Event Properly

shangshin
Builder

Hi,
The event in my Log always has a prefix yyyy-MM-dd hh:mm:ss,SSS e.g. 2013-07-30 07:12:11,649
To have the event indexed properly, can I use the line below in props.conf

   BREAK_ONLY_BEFORE=yyyy-MM-dd hh:mm:ss,SSS

Thanks for the advice!

Tags (1)
0 Karma
1 Solution

mloven_splunk
Splunk Employee
Splunk Employee

Nope. You're (kinda) mixing up BREAK_ONLY_BEFORE and TIME_FORMAT.

BREAK_ONLY_BEFORE is a regex field. Use something like:

BREAK_ONLY_BEFORE = \d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2},\d{3}
TIME_FORMAT = %Y-%m-%d %H:%M:%S,%3N

View solution in original post

mloven_splunk
Splunk Employee
Splunk Employee

Nope. You're (kinda) mixing up BREAK_ONLY_BEFORE and TIME_FORMAT.

BREAK_ONLY_BEFORE is a regex field. Use something like:

BREAK_ONLY_BEFORE = \d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2},\d{3}
TIME_FORMAT = %Y-%m-%d %H:%M:%S,%3N

shangshin
Builder

Thank you for the useful answer.

0 Karma

shangshin
Builder

or
BREAK_ONLY_BEFORE=/d/d/d/d-/d/d-/d/d/ /d/d:/d/d:/d/d

0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...