Getting Data In

Splitting Events

johnboldt
Explorer

I am trying to configure Splunk to properly split events from a data source. Here's what an event looks like:

----------------------------------------
Timestamp: 2/20/2012 3:30:44 PM
<log details>
----------------------------------------

Each event begins and ends with dashes. The time stamp is always on the line after the initial dashes.

Here's what I have tried (none of which work):

[sourcetype]
LINE_BREAKER = ----------------------------------------([\n\r]+)Timestamp:\s\d{1,2}/\d{1,2}/\d{4}\s\d{1,2}:\d{2}:\d{2}\s[A|P]M
SHOULD_LINEMERGE = false
MAX_EVENTS = 10000
MAX_TIMESTAMP_LOOKAHEAD = 80

[sourcetype]
LINE_BREAKER = ([\n\r]+)Timestamp\s*:\s\d{1,2}/\d{1,2}/\d{4}\s\d{1,2}:\d{2}:\d{2}\s[A|P]M
TIME_PREFIX = Timestamp\s*:\s*
SHOULD_LINEMERGE = false
MAX_EVENTS = 10000
MAX_TIMESTAMP_LOOKAHEAD = 35

[sourcetype]
SHOULD_LINEMERGE = true
BREAK_ONLY_BEFORE = ----------------------------------------[\n\r]+Timestamp\s*:\s*\d{1,2}\/\d{1,2}\/\d{4}\s*\d{1,2}:\d{1,2}:\d{1,2}\s*[A|P]M
TIME_PREFIX = Timestamp\s*:\s*
MAX_EVENTS = 10000
MAX_TIMESTAMP_LOOKAHEAD = 35

SHOULD_LINEMERGE=false
LINE_BREAKER=----------------------------------------[\n\r]+Timestamp\s*:
TIME_PREFIX=Timestamp\s*:\s*
TIME_FORMAT=%m/%d/%Y %r

What am I missing?

Tags (1)
0 Karma

jbsplunk
Splunk Employee
Splunk Employee

Give this a try:

LINE_BREAKER = \-+([\n\r])Timestamp:\s+

If it doesn't help, you may want to check splunkd.log for errors related to this line breaking failing. You could also check btool to ensure that the configuration is being read, run 'splunk cmd btool props list --debug > ~/output from $SPLUNK_HOME/bin/. I presume that all events carry the sourcetype you've specified in the 'sourcetype' metadata field?

Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...