Getting Data In

break events each 6lines

CarolinaHB
Explorer

Hello, 

I'm having issues with line break for some reason. I'm looking to break an event every 6 lines. Any suggestions?

Log Example:

Total Operations
Currents/sec:Max/sec:Success:Failed
2
144
184469195
201
Key Generate
Current/sec:max/sec:Success:Failed
0
0
0
0
Key Version Generate
Currect/sec:Max/sec:Success:Failed
0
0
0
0
Key Version Generate
Currect/sec:Max/sec:Success:Failed
0
0
0
0

 

0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Perhaps someone with better regex-fu than me can come with an expression that matches exactly 6 lines.  In the meantime, this may work for you.  It puts a break between a number and a word.

LINE_BREAKER = \d+([\r\n]+)\w
---
If this reply helps you, Karma would be appreciated.

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Perhaps someone with better regex-fu than me can come with an expression that matches exactly 6 lines.  In the meantime, this may work for you.  It puts a break between a number and a word.

LINE_BREAKER = \d+([\r\n]+)\w
---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...