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!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...