Splunk Search

How can I use the chart to show top 100 of a json list?

LMN007
Engager

I have a json list like this:

package: [{duration: 100, name: a}, {duration: 90, name: b} ...]

and I want to show the top 100 durations of the package list in the chart. What is the search command? Would you help me, please? 

Labels (4)
Tags (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| spath path=package{} output=package
| mvexpand package
| spath input=package
| sort 100 -duration
| table name duration

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust
| spath path=package{} output=package
| mvexpand package
| spath input=package
| sort 100 -duration
| table name duration

LMN007
Engager

Thank you! 

0 Karma
Get Updates on the Splunk Community!

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...

Cloud Monitoring Console - Unlocking Greater Visibility in SVC Usage Reporting

For Splunk Cloud customers, understanding and optimizing Splunk Virtual Compute (SVC) usage and resource ...

Automatic Discovery Part 3: Practical Use Cases

If you’ve enabled Automatic Discovery in your install of the Splunk Distribution of the OpenTelemetry ...