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!

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...

Cloud Monitoring Console - Unlocking Greater Visibility in SVC Usage Reporting

For Splunk Cloud customers, understanding and optimizing Splunk Virtual Compute (SVC) usage and resource ...

Automatic Discovery Part 3: Practical Use Cases

If you’ve enabled Automatic Discovery in your install of the Splunk Distribution of the OpenTelemetry ...