Getting Data In

What is the best logging format for key=value when one value is JSON?

hf2015
New Member

Hello -- I am logging incoming HTTP requests to my logs, what would be the best format for Splunk to pick them up in if one of the values has JSON? Example:

user=jsmith method=POST path=/a/path payload="{some: "thing"}"

or

user=jsmith method=POST path=/a/path payload={some: "thing"}

or some other way? Thanks.

0 Karma

niketn
Legend

I would say KV_MODE=auto should be fine. You can create field extraction for JSON data using Interactive Field Extractor using regular expression.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Observe and Secure All Apps with Splunk

 Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What's New in Splunk Observability - August 2025

What's New We are excited to announce the latest enhancements to Splunk Observability Cloud as well as what is ...

Introduction to Splunk AI

How are you using AI in Splunk? Whether you see AI as a threat or opportunity, AI is here to stay. Lucky for ...