Splunk Search

How to use the result from one function into another function

splunkymage
Observer

Hello all, I need help with this :((
How to use derivatives of 1st function results into the 2nd function in splunk? Please see the example below:

1st function: for instance, from the first eval, i got the names of the top 100 sold fruits and their respective companies.

2nd function: From this top 100 fruits, I would like to then, search for the fruits import-export countries (ie the export country (origin) and imported (destination) country). Each of the fruits may have more than 1 set of export-import. How do I go about doing it? What's the syntax to get the top 100 fruits into the second function? Any guidance appreciated

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

You can use the results of one search to filter the results of another search

 

search 2 [search 1]

 

Search 1 would return the import/ export countries of the top 100 selling fruits, which are then used as part of the filter for search 2. In search 1 you can sort then truncate the results using head 100.

0 Karma
Get Updates on the Splunk Community!

Unlock Database Monitoring with Splunk Observability Cloud

  In today’s fast-paced digital landscape, even minor database slowdowns can disrupt user experiences and ...

Purpose in Action: How Splunk Is Helping Power an Inclusive Future for All

At Cisco, purpose isn’t a tagline—it’s a commitment. Cisco’s FY25 Purpose Report outlines how the company is ...

[Upcoming Webinar] Demo Day: Transforming IT Operations with Splunk

Join us for a live Demo Day at the Cisco Store on January 21st 10:00am - 11:00am PST In the fast-paced world ...