Security

How to pass result set from one query to main query

madhan_dc
New Member

I am running a query like this

 

 

index=main source=transferstatus sourcetype=logs transaction.transferSet.FileName="*myfile*" | stats dc(transaction.Id) by transaction.Id

 

 

this gives me the unique transaction Ids that i am looking for 

Now i want to pass this unique transaction Ids to a query like below

 

 

index=main  source=transferstatus sourcetype=logs transaction.action="success" transaction.Id=[ pass each unique value i got from first query to here]

 

 

transaction.action="success" will not present on the first query results..

it will be part of success events that wont have "transaction.transferSet.FileName" field in it.

how do I join these two queries?

 

 

 

 

 

 

Labels (1)
0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@madhan_dc 

Have you tried something like this?

index=main source=transferstatus sourcetype=logs transaction.action="success" [search index=main source=transferstatus sourcetype=logs transaction.transferSet.FileName="*myfile*" 
| stats dc(transaction.Id) by transaction.Id | fields transaction.Id]

 

KV 

0 Karma

madhan_dc
New Member

not sure how this question landed in this section, can someone please move it to a Splunk query section if there is one. thanks. Sorry about this.

0 Karma
Get Updates on the Splunk Community!

Dashboard Studio Challenge - Learn New Tricks, Showcase Your Skills, and Win Prizes!

Reimagine what you can do with your dashboards. Dashboard Studio is Splunk’s newest dashboard builder to ...

Introducing Edge Processor: Next Gen Data Transformation

We get it - not only can it take a lot of time, money and resources to get data into Splunk, but it also takes ...

Take the 2021 Splunk Career Survey for $50 in Amazon Cash

Help us learn about how Splunk has impacted your career by taking the 2021 Splunk Career Survey. Last year’s ...