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
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, ...