Splunk Search

how can i pass the field values from one search to my subsearch or to another search

Nadhiya123
Explorer

index=xx sourcetype=yy |eval ..|table aa
[| search index=xx1 sourcetype=yy1 yy=aa values |table yy zz ff ] in a single search ..

Tags (1)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi Nadhiya123,
if you want to use a field of the soubsearch to filter the main search you have to run something like this:

index=xx1 sourcetype=yy1  [ search index=xx sourcetype=yy |eval .. | rename aa AS yy | table yy ]
|table yy zz ff

you have only to put attention that fieldname is the same both in main and sub search (use rename command in subsearch) and remember that subsearch has 50,000 events limit.

If instead you want to use a field to join two searches, you can run something like this:

index=xx sourcetype=yy 
| eval ..
| join aa [| search index=xx1 sourcetype=yy1 ]
| table aa yy zz ff 

Bye.
Giuseppe

0 Karma

Nadhiya123
Explorer

how can I include maxout in my subsearch since its truncating the results

0 Karma

gcusello
SplunkTrust
SplunkTrust

To modify the 50,000 limit for subsearches results you have to modify limits.conf file, but with attention!
see http://docs.splunk.com/Documentation/Splunk/latest/Admin/Limitsconf?ac=partner_smt
bye.
Giuseppe

0 Karma

Nadhiya123
Explorer

Is there an option to include in the SPL query

0 Karma

gcusello
SplunkTrust
SplunkTrust

No! only in limits.conf configuration file.
Bye.
Giuseppe

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...