Getting Data In

How do you extract JSON logs that have value =?

rakeshksingh
New Member

Hi All,

I am looking for a field extraction at that time at indexing for JSON file format.

{"field1": "a=\"1", b=\"\",c=\"\",d=\"4", "field2": "x=\"a",y=\"\", "field3": "value3",}

getting logs in Splunk as below

field1 =a="1", b="",c="",d="4"
field2=x="a",y=" "

But, Looking for key value pair for a,b,c,d,x,y in the form of fieldname and fieldvalue.
a=1
d=4
x=a
Tried with spath,xmlkv, but no luck.

Could you please help me out in this.

Thanks in advance

0 Karma

valiquet
Contributor

SED-alter=s/=\\"/:\\"/

0 Karma

rakeshksingh
New Member

its not working.

Could you please suggest any other way ?

0 Karma
Get Updates on the Splunk Community!

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...