Splunk Enterprise

How to combine two different events from different indexes/sourcetypes?

mikepangrac
Loves-to-Learn Lots

Hello, I'm trying to combine different events (with different fields) into one event based on a common field value.  Is there an easy way to do this?  For example:

(index=data sourcetype=source1) OR (index=customer sourcetype=sourcetype2)

Event from Source 1:
customer#: 12345
billingpackage: fastspeed
speed: 50m

Event from Source 2:
customer#: 12345
address: 1st street noth
zip: 41783

Desired Event:
customer#: 12345
billingpackage: fastspeed
speed: 50m
address: 1st street north
zip: 41783

Thanks in advance for the help!

Labels (2)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

You were close.  Run the query you have then use the stats command to merge the results.

(index=data sourcetype=source1) OR (index=customer sourcetype=sourcetype2)
| stats values(*) as * by customer

 

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Splunk Answers Content Calendar, June Edition

Get ready for this week’s post dedicated to Splunk Dashboards! We're celebrating the power of community by ...

What You Read The Most: Splunk Lantern’s Most Popular Articles!

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

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...