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!

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

Splunk Decoded: Business Transactions vs Business IQ

It’s the morning of Black Friday, and your e-commerce site is handling 10x normal traffic. Orders are flowing, ...

Fastest way to demo Observability

I’ve been having a lot of fun learning about Kubernetes and Observability. I set myself an interesting ...