Splunk Cloud Platform

How to turn off "pretty print" for JSON

bryhoffman
Explorer

We are having an issue where in order to see correct JSON syntax highlighting it requires setting "max lines" to "all lines".

On a separate post the resolution was to turn off "pretty printing" so instead of each event taking up multiple lines it is only takes up one. Which then allows Splunk to show the data in the correct JSON syntax highlighting.

How do I turn this off?

Labels (1)
0 Karma

sainag_splunk
Splunk Employee
Splunk Employee

I believe you should have something like below, did you already try this?

On Your parsing instance
[my_sourcetype]
SHOULD_LINEMERGE = false
LINE_BREAKER = }([\n\r]*){
TRUNCATE = as needed


On your Search Head
[my_sourcetype]
KV_MODE = json

 

 

Hope this helps.

 

 

0 Karma
Get Updates on the Splunk Community!

Technical Workshop Series: Splunk Data Management and SPL2 | Register here!

Hey, Splunk Community! Ready to take your data management skills to the next level? Join us for a 3-part ...

Spotting Financial Fraud in the Haystack: A Guide to Behavioral Analytics with Splunk

In today's digital financial ecosystem, security teams face an unprecedented challenge. The sheer volume of ...

Solve Problems Faster with New, Smarter AI and Integrations in Splunk Observability

Solve Problems Faster with New, Smarter AI and Integrations in Splunk Observability As businesses scale ...