Getting Data In

How do you extract JSON logs that have value =?

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

Contributor

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

0 Karma

New Member

its not working.

Could you please suggest any other way ?

0 Karma
State of Splunk Careers

Access the Splunk Careers Report to see real data that shows how Splunk mastery increases your value and job satisfaction.

Find out what your skills are worth!