Splunk Search

How to use join command to keep events from subsearch that do not match with parent search?

sloshburch
Splunk Employee
Splunk Employee

My understanding of the documentation (and my experiments) is that the inner keeps only events that match both searches, left keeps matches as well as items that were in the parent search but not in the child search, and outer keeps ONLY events that did not match from both searches. Unfortunately, I can't figure out how to keep items from the subsearch.

The search that I have set as the parent search returns more than 50k events and therefore can't be the subsearch.

Any ideas how to use the join command where the search keeps any events from the subsearch that do not have matches with the parent?

Tags (3)
1 Solution

somesoni2
Revered Legend

You might be able to do it without join (using stats). Could you provide your two searches?

View solution in original post

strive
Influencer
0 Karma

somesoni2
Revered Legend

You might be able to do it without join (using stats). Could you provide your two searches?

sloshburch
Splunk Employee
Splunk Employee

Thanks. That is exactly how I interpreted your tip. Ideally I get them on the same initial search but at the least I think I'll be all set using stats. Thanks again!

0 Karma

somesoni2
Revered Legend

Just for reference (see 2nd answer) http://answers.splunk.com/answers/81741/full-outer-join

0 Karma

sloshburch
Splunk Employee
Splunk Employee

Yes! Stats! I think that's the way to go. Then I can use something simple like a | fields just the stuff to keep | stats latest(*) as * by unique1 unique2

Good idea!

I can't really share the actual search - they are derived from a massive amount of macros and I'm concerned they exposes a little more about the business than I'm comfortable with.

The stats is a great idea - exactly what I was looking for - a way to approach this from another direction. Thanks again.

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