Getting Data In

How to split single line event into multiple events based on pattern?

flucman
Explorer

Is it possible to split a single line event into multiple based on a pattern? Ex. I have:

SNMPv2-SMI::enterprises."4551.5.1.1.1.1.4.8.4.1.6.1.1" = "4.168961" SNMPv2-SMI::enterprises."4551.5.1.1.1.1.4.8.4.1.9.1.1" = "1"

on one line and want to split it into two SNMP events. I have been testing with LINE_BREAKER and BREAK_ONLY_BEFORE in props.conf but not having any luck. Have tried the below (one at a time):

BREAK_ONLY_BEFORE = SNMPv2

LINE_BREAKER = ([\r\n]+)|SNMPv2

Thanks!

0 Karma

chanfoli
Builder

Something along the lines of this will cause it the see the string as your line breaker and appears to break the events up, with the side effect of disposing of the line breaker text:

LINE_BREAKER=(SNMPv2-SMI)
NO_BINARY_CHECK=1
SHOULD_LINEMERGE=false

Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

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