Splunk Search

Custom multi-line parsing tip

clyde772
Communicator

I want to chop multiline events like below. I had splunk to automatically process the data, but it didn't quite work where the event started with "Begin_Event".
How can I define custom event separation rule so that the each evens starts after "Begin_Event" tag?

(Begin_Event)

environmentFailureEvent - EAS - KG-079, Cab 1, Pos 1, active ACG, EAS 0 - May 3, 2010 00:02:55. [247] Rectifier Module Fail - Clear
(EndEvent)

(BeginEvent)

processingFailureEvent - IHLR_ALARM_APP - KTIHLR1_B, IHLR_ALARM_APP 1 - May 3, 2010 00:02:49. [17260] Subscriber Not In iDEN HLR - Minor. RC:77 imsi=450079680700513

(EndEvent)

Tags (1)
0 Karma

gkanapathy
Splunk Employee
Splunk Employee

Just set:

SHOULD_LINEMERGE = false
BREAK_ONLY_BEFORE = ^\(Begin_Event\)

for your sourcetype or source in props.conf. Alternatively you could use:

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

Variations of the above can remove the (Begin_Event) line as well.

Get Updates on the Splunk Community!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...