Getting Data In

Json data processing

xuehpx
New Member

I have a json format of data, I can not use the following method to process the results I want, when metricValue is a new dictionary, I changed how to extract.

xuehpx_0-1628213089777.png

index="huawei_fc" sourcetype="BW_HWFC:metric:host" | rename value{}.* as * | eval t = mvzip(metricId,metricValue) | mvexpand t | eval mId=mvindex(split(t,","),0),mValue=mvindex(split(t,","),1) | stats values(mValue) as mValue by _time,urn,mId

xuehpx_1-1628213321615.png

I was unable to extract the data in metricValue from the SPL above

 

 

 

 

Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Try a different delimiter in mvzip and split

| eval t = mvzip(metricId,metricValue,"|") | mvexpand t | eval mId=mvindex(split(t,"|"),0),mValue=mvindex(split(t,"|"),1)
0 Karma

xuehpx
New Member
Thank you so much for your advice! I will try according to your suggestion in the near future.
0 Karma
Get Updates on the Splunk Community!

What You Read The Most: Splunk Lantern’s Most Popular Articles!

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...

Index This | What goes away as soon as you talk about it?

May 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...