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!

Continuing Innovation & New Integrations Unlock Full Stack Observability For Your ...

You’ve probably heard the latest about AppDynamics joining the Splunk Observability portfolio, deepening our ...

Monitoring Amazon Elastic Kubernetes Service (EKS)

As we’ve seen, integrating Kubernetes environments with Splunk Observability Cloud is a quick and easy way to ...

Cloud Platform & Enterprise: Classic Dashboard Export Feature Deprecation

As of Splunk Cloud Platform 9.3.2408 and Splunk Enterprise 9.4, classic dashboard export features are now ...