Splunk Search

Compare results from two separat search results

Tika
Explorer

I have two separate searches that provides me the same data field in two different fieldds. I want to identify the common items across these two. 

 

search 1 : 

 

`sample_source` earliest=-7d env="test" msg="storage" type="running_services" data="*myservice*" | dedup info.unitId | table info.unitId

 

and search 2 : 

 

`sample_source_2` value="etc" idea="random" earliest=-14d name="*myservice*" | dedup columns.serviceID | table columns.serviceID

 

 

I want to see the common items across these two tables. I looked at similar questions posted here, but they all start with index= , and sourcetype = , I do not know which ones from above maps to which to get index, I am new to splunk. Appreciate any help. Thanks!

Labels (2)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

`sample_source` and `sample_source_2` are macros and possible contain the indexes (and sourcetypes) being used.

If you press <ctrl><shift>E when the search is in the search window, it will produce an expanded version of the search, so you will be able to see what the search macros actually expand to.

Get Updates on the Splunk Community!

Enter the Splunk Community Dashboard Challenge for Your Chance to Win!

The Splunk Community Dashboard Challenge is underway! This is your chance to showcase your skills in creating ...

.conf24 | Session Scheduler is Live!!

.conf24 is happening June 11 - 14 in Las Vegas, and we are thrilled to announce that the conference catalog ...

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...