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!

October Community Champions: A Shoutout to Our Contributors!

As October comes to a close, we want to take a moment to celebrate the people who make the Splunk Community ...

Community Content Calendar, November Edition

Welcome to the November edition of our Community Spotlight! Each month, we dive into the Splunk Community to ...

Stay Connected: Your Guide to November Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...