Splunk Search

Use the result of one query as input to the next query

Deepz2612
Explorer

Hi @niketn 

Greetings..

I have a requirement where..

My first query is as below:

index = <my_index> eventtype=" " | table field1

And the values of my first query has to be used in the search of my second query

index=<my_index> source= " " and field1 values..

I tried using join it doesnt seem to help.

 

Please advice

Labels (2)
0 Karma

aasabatini
Motivator

hi 
use fields comand not table,  also if the result of the first search are less number of events you can use a subsearch.

index=<my_index>  [search index = <my_index> eventtype=" " |  fields field1]

“The answer is out there, Neo, and it’s looking for you, and it will find you if you want it to.”
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...