Splunk Search

Data Onboarding line break at empty lines

inventsekar
SplunkTrust
SplunkTrust

Hi.. 

Spent some one or two hrs, but no luck, hence posting here.. the sample logs:

1.1.1. test log a
1.1.1. test log abc

1.1.2. test log b
1.1.2. test log bcd

one thing - no need to worry about timestamps. 

one log will have around 10 events.
the lines with the starting 1.1.1. should be one event, 1.1.2. should be next event and so on.. 

or simply, the empty lines should break the events. 

please suggest, thanks. 

thanks and best regards,
Sekar

PS - If this or any post helped you in any way, pls consider upvoting, thanks for reading !
Labels (1)
0 Karma
1 Solution

yeahnah
Motivator

Hi @inventsekar 

Give this ago...

 

SHOULD_LINEMERGE=false
LINE_BREAKER=([\r\n]\s[\r\n]+)

 

 

 Not exactly sure why the \s makes a difference - regex101 says \s matches any whitespace character (equivalent to [\r\n\t\f\v  ]) - but it tested OK when I used it 

yeahnah_0-1684376337450.png

Hope that helps

View solution in original post

0 Karma

inventsekar
SplunkTrust
SplunkTrust

wow, @yeahnah you are a life saver ! thanks a ton! 

thanks and best regards,
Sekar

PS - If this or any post helped you in any way, pls consider upvoting, thanks for reading !
0 Karma

yeahnah
Motivator

FYI - it's the \v metacharacter that makes it work.  From the references I found it means vertical tab or vertical whitespace character, which in this instance would equate to the blank line.

0 Karma

yeahnah
Motivator

Hi @inventsekar 

Give this ago...

 

SHOULD_LINEMERGE=false
LINE_BREAKER=([\r\n]\s[\r\n]+)

 

 

 Not exactly sure why the \s makes a difference - regex101 says \s matches any whitespace character (equivalent to [\r\n\t\f\v  ]) - but it tested OK when I used it 

yeahnah_0-1684376337450.png

Hope that helps

0 Karma
Get Updates on the Splunk Community!

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...

Index This | What goes away as soon as you talk about it?

May 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...

What's New in Splunk Observability Cloud and Splunk AppDynamics - May 2025

This month, we’re delivering several new innovations in Splunk Observability Cloud and Splunk AppDynamics ...