Splunk Search

Multiple source types in one search

sandeep_thosar
Explorer

Hi Team,

I have following scenario

source type :A contains Account Number
Source type :B Contains Account ID & Date

Want to write search to join this two source types and at the same time want to find Account Number of source type A in Account ID of source type B

Please help.

thanks in advance.

Tags (1)

strive
Influencer

You can achieve this using subsearches.
Note: dont forget to read the performance of subsearches in splunk documentation.

The below two links will help you

http://answers.splunk.com/answers/78899/problem-searching-for-matching-fields-within-multiple-source...
http://docs.splunk.com/Documentation/Splunk/6.1.2/Search/Aboutsubsearches

smolcj
Builder

index=yourindex sourcetype=A | stats values(accountnumber) as accountid |join accountid [search index=yourindex sourcetype=B|table accountid date ]

did u try this?

0 Karma

strive
Influencer

You can achieve this using subsearches.
Note: dont forget to read the performance of subsearches in splunk documentation.

The below two links will help you

http://answers.splunk.com/answers/78899/problem-searching-for-matching-fields-within-multiple-source...
http://docs.splunk.com/Documentation/Splunk/6.1.2/Search/Aboutsubsearches

0 Karma

lbogle
Contributor

I have a similar search I am trying to work out except with machine hostnames. Single index w/ 5 different sources and am trying to build a report showing if a particular hostname shows up in each of the sources or perhaps highlight which source it's missing from.

0 Karma

sandeep_thosar
Explorer

My scenario is i have one Index which conatins two source files for ex. Source type="A" and Source Type="B". Both files contains Account ID which will be extracted using rex command. Now i want to search if account ID from Source type "A" is present in Source Type "B" then i want to extract customer ID from Source Type "B".

0 Karma

smolcj
Builder

sandeep, would u mind providing some more details?
like what was the output of this query and how your requirement differ from its output?
As I am not an expert in splunk, it may help me.
Thank u

0 Karma

sandeep_thosar
Explorer

Hi,

Thanks for help I am already tryed this but it's not fulfilled my requirements and i want to search Acccount Number from Source type A and on the basis of that want some values and Account ID from source B.

Please help as i am new to splunk.

Thanks in advance

0 Karma
Get Updates on the Splunk Community!

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL  The Splunk AI Assistant for SPL ...

Buttercup Games: Further Dashboarding Techniques (Part 5)

This series of blogs assumes you have already completed the Splunk Enterprise Search Tutorial as it uses the ...

Customers Increasingly Choose Splunk for Observability

For the second year in a row, Splunk was recognized as a Leader in the 2024 Gartner® Magic Quadrant™ for ...