Getting Data In

How to configure props.conf to parse timestamps for two different types of events?

a212830
Champion

Hi,

I have a feed that has two different types of events and need to grab them both. Not sure how to do it...here's a sample:

Tracking ntp.fmr.com [1.2.3.4].
The current time is 6/14/2016 1:25:29 PM.
13:25:29 d:-00.0000359s o:-00.0204019s  [                           *                           ]
13:26:29 d:-00.0000379s o:-00.0215103s  [                           *                           ]
13:27:29 d:-00.0000370s o:-00.0224686s  [                           *                           ]
Tracking ntp.fmr.com [1.2.3.4].
The current time is 6/14/2016 1:41:12 PM.
13:41:12 d:-00.0000390s o:+00.1655246s  [                           *                           ]
13:42:12 d:-00.0000452s o:+00.1666010s  [                           *                           ]
13:43:12 d:-00.0000363s o:+00.1684723s  [                           *                           ]
13:44:12 d:-00.0000391s o:+00.1697982s  [                           *                           ]

I want to grab the first two lines as one event, using the second line's timestamp, and grab the ones below as single line events, using that timestamp and then do the same as they appear.

darrenfuller
Contributor

Here's a props.conf sourcetype definition that does that...

[SourcetypeName]
SHOULD_LINEMERGE=true
NO_BINARY_CHECK=true
BREAK_ONLY_BEFORE=(Tracking|\d{2}\:\d{2}\:\d{2}\s)
LINE_BREAKER=([\r\n]+)
TRUNCATE=300

Explanation...

SHOULD_LINEMERGE set to true so Splunk considers multiline events
LINE_BREAKER is set to either carriage return (\r) or newline (\n) to cover different line break encoding
BREAK_ONLY_BEFORE further restricts the line breaking to only occur when the regex pattern occurs after the newline

Get Updates on the Splunk Community!

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...