Getting Data In

How to break event consisting json data properly

stamstam
Explorer

Hi everyone, I have a log file of the below pattern:
2018-05-24 [POST] 8.8.8.8 GET /api {
json: data
}
And it is not breaking properly.
the event is cut in the middle of the json data.
my props.conf is as follows:
[source::/path/to/log/dir/*]
SHOULD_LINEMERGE = false
NO_BINARY_CHECK = 1
LINE_BREAKER = (?:}) ([\r\n]+)
TRUNCATE = 0

Please help me understand this better...

somesoni2
SplunkTrust
SplunkTrust

Try using this

[source::/path/to/log/dir/*]
SHOULD_LINEMERGE = false
NO_BINARY_CHECK = 1
LINE_BREAKER = ([\r\n]+)(?=\d{4}-\d{2}-\d{2}\s\[)
TRUNCATE = 0
0 Karma
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...