Splunk Search

Filter search by subsearch values

ahcarpenter
Engager

Hi,

What's the best way to filter a search against a set of unique id's in a subsearch?


Currently, approaching it as such:

<events to filter against subsearch ids>
| join left subsearch_id 
| [search subsearch]

Though, it's returning a 1:1 set v. all primary search events that contain a matching id.

Labels (2)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

There's no much to work with in the question, but perhaps this gives you an idea.

<events to filter against subsearch ids> [search subsearch | return 1000 subsearch_id]

The subsearch with return command returns a string of the type "(subsearch_id="foo" OR subsearch_id="bar")" which filters the events from the base search.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...