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!

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...