Getting Data In

How do I configure line breaking for this text file?

DavidHourani
Super Champion

Hello Splunkers,

I'm having an issue with my event break. I have a huge text file with no line breaks that looks something like:

2016-02-08T12:25:21+01:00blablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablabla 2016-02-08T12:25:21+01:00taablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablabla2016-02-08T12:25:21+01:00blablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablabla2016-02-08T12:25:21+01:00blablablablablablablablablablablablablablablablablablablablablablablablablablablablablabla

I tried using the BREAK_ONLY_BEFORE setting and other settings to break my event, but nothing works. Any ideas how I can break this?

Regards,
David

0 Karma

skoelpin
SplunkTrust
SplunkTrust

Try this.. Make sure you put this stanza in your props.conf on the indexer and restart your Splunk service after adding this

[SOURCE]
 SHOULD_LINEMERGE=true
 BREAK_ONLY_BEFORE = \d{4}\-\d{2}\-\d{2}T\d{2}\:\d{2}\:\d{2}\+\d{2}
0 Karma

DavidHourani
Super Champion

I did, it doesn't work. im using GUI for import and events aren't getting split no matter what i do.

0 Karma

skoelpin
SplunkTrust
SplunkTrust

Is there a space between the text and the timestamp in your logs?

0 Karma

DavidHourani
Super Champion

yeap whitespace right before the timestamps..its all in one huge block.

0 Karma

skoelpin
SplunkTrust
SplunkTrust

I'm confused. There appears to be a space before some of the timestamps but in others there is no space before the timestamp, regex wouldn't pick this up as it doesn't fit a pattern.

This should work and if not, then I would suggest modifying your log files so it includes a space

BREAK_ONLY_BEFORE = \d{4}\-\d{2}\-\d{2}T\d{2}\:\d{2}\:\d{2}\+\d{2}\:\d{2}
0 Karma
Get Updates on the Splunk Community!

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...