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!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...