Splunk Search

compare two searches

zuzgon2
Engager

Hey,
I want to compare the results of the first search to the second. Like loop through the second one with the first ones results

Something like this,
Index=index1| eval val1=substr(value, 0,1) [search index=index2| eval val2=substr(value2, 2,1) | eval match=if(val1==val2, 1,0)]

Thanks!

Tags (3)
0 Karma

somesoni2
Revered Legend

Try this

index=index1| eval val1=substr(value, 0,1) | eval joinfield=1 | join max=0 joinfield [search index=index2| eval val2=substr(value2, 2,1) | eval joinfield=1] | eval match=if(val1==val2, 1,0)
0 Karma
Get Updates on the Splunk Community!

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

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...