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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...