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!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...