Splunk Enterprise Security

Passing fields into multiple searches w/out using Map Cmd

McThunderStick
Engager

*I would typically use the map command for this, but it's currently broken and support is working to fix it

That being said, I'm trying to take a value from search1, pass it to search2 , grab  a field from that 2nd search, and also pass that to 3rd search. Hopefully one of you lovely people can point me in the right direction.

IE:

index=foo | rex field field1

index=boo field2=$field1$ | table src_ip

index=bar src_ip=$src_ip$ | stats  values(domain) etc etc

 

Any help on this would be supremely appreciated

Labels (1)
Tags (2)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

It looks like subsearches may do the job.

index=bar 
  [ index=boo 
    [index=foo | rex field field1 | rename field1 as field2 | format]
  | return src_ip ]
| stats  values(domain) etc etc
---
If this reply helps you, Karma would be appreciated.

View solution in original post

to4kawa
Ultra Champion

index=foo OR index=boo OR  index=bar | rex field field2|eventstats dc(index) as flag1 by field2 |  stats  values(domain) etc etc dc(index) as flag values(flag1) as flag1 by src_ip |where flag1=2 AND flag > 1

0 Karma

richgalloway
SplunkTrust
SplunkTrust

It looks like subsearches may do the job.

index=bar 
  [ index=boo 
    [index=foo | rex field field1 | rename field1 as field2 | format]
  | return src_ip ]
| stats  values(domain) etc etc
---
If this reply helps you, Karma would be appreciated.
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Splunk Decoded: Service Maps vs Service Analyzer Tree View vs Flow Maps

It’s Monday morning, and your phone is buzzing with alert escalations – your customer-facing portal is running ...

What’s New in Splunk Observability – September 2025

What's NewWe are excited to announce the latest enhancements to Splunk Observability, designed to help ITOps ...

Fun with Regular Expression - multiples of nine

Fun with Regular Expression - multiples of nineThis challenge was first posted on Slack #regex channel ...