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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...