Knowledge Management

Use the output of one search as input to another search

Deepz2612
Explorer

Hi,
I have a request where in
1.I will have to perform a search to get value A,B and C (where B is the values of the field that i created using regex)
2.Based on the values of B -> I will have to perform another search in completely different index and get the values of E and F
3.And also based on the values of B -> I will have to perform another search in completely different index and get the values of G and H
4.Finally i should have table with A B C E F G H

I tried using join concept but the common field between 1st and 2nd search is B and B is the field that i extracted using rex.
I'm not because of that reason it is working or not,I'm getting ) results.

Kindly help!

Thanks!

Tags (1)
0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@Deepz2612

You can use append and stats for same. Please refer below sample search for same.

index=a | fields A B C 
append [ search index=b | fields B E F ] 
append [ search index=c | fields B G H ]
| stats values(A) as A values(C) as C values(D) as D values(E) as E values(F) as F values(G) as G values(H) as H by B 
| table A B C D E F G H
0 Karma

Deepz2612
Explorer

Thanks!
But i wanted to perform 2nd and 3rd search based on the values of B that i get from 1st search

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!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...