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!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

December 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...