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!

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!

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

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...