Splunk Search

How to search unique values in 2 different indexes, compare them, and determine which values are missing from which index?

Communicator

I've been racking my brain over multi-searches, subsearches, and a few other methods I harvested from Google and Splunk Answers, but so far, I've not been able to find a solution for this.

Scenario:
I have two separate indexes. In both indexes, I have a field called "site" which contains a domain URL. In either one of these indexes, the site value could appear anywhere from not at all to hundreds of times. I need to construct a search that will boil down each index to the unique site URLs that appear in each, then compare the results of both indexes to see if there are URLs that appear in one index and not the other.

The search query does not necessarily need to do show what's missing from both at once, it could be either or, as long as I can modify the search to get the other results I'm looking for. Any idea how to do this?

0 Karma

SplunkTrust
SplunkTrust

We would definitely need a sample search using which you can get site information from each index separately. For now give this a try

index=index1 OR index=index2 | chart dc(site) over site by index | where index1=0 OR index2=0 
0 Karma