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
Revered Legend

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!

Introducing the 2024 SplunkTrust!

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

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...