Splunk Search

Merging two data sources

keishamtcs
Explorer

Hi..

Need some help in merging two search result.

i have one source with below result as such -

CommonIndex host Max
WinUnix appdcos 23.10
WinUnix hpmail 91.80

Another search result with output as such -

CommonIndex host Max
WinUnix ADDS 20.25
WinUnix BCMP 75.16

How can i reproduce the results like below in a single table. I have tried join,append but output is not correct.

CommonIndex host Max
WinUnix appdcos 23.10
WinUnix hpmail 91.80
WinUnix ADDS 20.25
WinUnix BCMP 75.16

Tags (2)
0 Karma
1 Solution

thambisetty
SplunkTrust
SplunkTrust

Hi,
try something like below,

index=a | table CommonIndex host Max | append [|search index=b | table CommonIndex host Max]

if fields are common in two indexes. you can try something like below,

index=a OR index=b | table CommonIndex host Max
————————————
If this helps, give a like below.

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust

It would help to see your two searches, but the general way to do it is to merge the two queries. You shouldn't need to use append or join.

(index=index1 sourcetype=st1) OR (index=index1 sourcetype=st2) | ... | table ComminIndex host Max
---
If this reply helps you, Karma would be appreciated.

thambisetty
SplunkTrust
SplunkTrust

Hi,
try something like below,

index=a | table CommonIndex host Max | append [|search index=b | table CommonIndex host Max]

if fields are common in two indexes. you can try something like below,

index=a OR index=b | table CommonIndex host Max
————————————
If this helps, give a like below.
0 Karma
Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Dynamic formatting from XML events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Stronger Security with Federated Search for S3, GCP SQL & Australian Threat ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...