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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...