Splunk Search

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

krishnab
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.

Ex:

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

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

krishnab
Path Finder

Hi,

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!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...