Splunk Search

Pass a value from a macro to a subsearch after doing a join

Path Finder

Hi ,

I have a macro which gets values including host,now i do a left join .Once i do a left join in the subsearch only those host which was in previous search result should be searched.


my search which results host
| join type=left xxx
[search index=a source=b host="host from previous search"]

Assume my first search returned many host,so in my second search after join,it should take individual host and check for any data in index=a

Tags (1)
0 Karma

search1 |fields host| rename host as host1 | join host1 [search index=a source=b host="host from previous search"]
0 Karma

Path Finder


Thank you for your answer.

But my requirement is i should join based on some other value,but in the subsearch it should take host values from previous search(main search)

0 Karma
Get Updates on the Splunk Community!

Build Scalable Security While Moving to Cloud - Guide From Clayton Homes

 Clayton Homes faced the increased challenge of strengthening their security posture as they went through ...

Mission Control | Explore the latest release of Splunk Mission Control (2.3)

We’re happy to announce the release of Mission Control 2.3 which includes several new and exciting features ...

Cloud Platform | Migrating your Splunk Cloud deployment to Python 3.7

Python 2.7, the last release of Python 2, reached End of Life back on January 1, 2020. As part of our larger ...