Splunk Dev

how to display common results from two index

tp92222
Explorer

Hi,
i have 2 indexes
index=abc & index=xyz

Index abc has following values

ID.......Type Name class Address
001....A.......Tejas....12A...India
002....A.......Jhon.....11A...USA
003....B.......Tom......11A...UK
004....C.......Ram......12B...India
004....A.......Ron......12B...UAE

Index XYZ has following values

ID.......Type Name class Address
001....A.......Tejas....12A...India
002....A.......Jhon.....11A...USA
004....D.......Ram......12B...India
004....A.......Ron......12B...UAE

It should return result where exact match found in both index for ID AND Type

Desired result

001....A.......Tejas....12A...India
002....A.......Jhon.....11A...USA
004....A.......Ron......12B...UAE

Thank you

Tags (1)
0 Karma
1 Solution

jkat54
SplunkTrust
SplunkTrust

index=abc [search index=xyz | dedup ID Type | fields ID Type]

also

index=abc | join type=inner max=0 ID Type [search index=xyz]

View solution in original post

0 Karma

jkat54
SplunkTrust
SplunkTrust

index=abc [search index=xyz | dedup ID Type | fields ID Type]

also

index=abc | join type=inner max=0 ID Type [search index=xyz]

0 Karma

tp92222
Explorer

Thanks for help

0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...