Splunk Search

Kicking different searches

yuwtennis
Communicator

Hi!

I want to ask question if something like below can be implemented.

I have created 4 searches.

search A : creates a CSV file with outputcsv
search B : creates a CSV file using the csv from search A
search C : creates a CSV file using the csv from search A
search D : creates a CSV file using the csv from search A

So the call flow would be like,

search A -> search B
-> search C
-> search D

search B - D has to be called the in the stream of search A.

Is this possible?

Thanks,
Yu

Tags (1)
0 Karma
1 Solution

Ayn
Legend

You can use the fact that subsearches are run before the main search, so first of all run search A in a subsearch so that the CSV file exists, then use it in all your other searches.

searchB [search searchA | outputcsv ... | return ""] | outputcsv ... | append [search searchC | outputcsv ... ] | append [search searchD | outputcsv ... ]

View solution in original post

Ayn
Legend

You can use the fact that subsearches are run before the main search, so first of all run search A in a subsearch so that the CSV file exists, then use it in all your other searches.

searchB [search searchA | outputcsv ... | return ""] | outputcsv ... | append [search searchC | outputcsv ... ] | append [search searchD | outputcsv ... ]

yuwtennis
Communicator

Hello Ayn.

This looks nice. I will take a look at it.

Thanks,
Yu

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

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