Splunk Search

subsearch for multiple indexes

anudeep247
New Member

Hi All

I have 2 indexes. 1st indexes contains list of names. i have to pass each name as input to second index and calculate values for each name.

We can use two quires to get each name and pass to 2nd index. But i need them in single query. expecting output fields from 1st index as well as calculated fields from the 2nd index.. ?????

Tags (1)
0 Karma

somesoni2
Revered Legend

If name is the common field in both indexes, you can use below to get all attributes for a name from two indexes.

index=indexA | table name,..other fields from indexA... | join name [search index=indexB | table name,..other fields from indexB...]

somesoni2
Revered Legend

I believe so. Let me know if there are any issues.

0 Karma

anudeep247
New Member

Thank you somesoni2,
Here name is common for both indexes and i also have 2nd fields with different name. will this work??

0 Karma
Get Updates on the Splunk Community!

.conf24 | Day 0

Hello Splunk Community! My name is Chris, and I'm based in Canberra, Australia's capital, and I travelled for ...

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

(view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...