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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...