Getting Data In

Query joining 3 sourcetypes

markhvesta
Path Finder

I am trying to create a query that combines results from 3 sources, one of which is a lookup table. Any help would be appreciated.

(sourcetype="sourcetypeA OR sourcetype="sourcetypeB" ) fieldinsourcetypeAndB=*   
| fields [all fields in A and B]
|stats values(*) as * by fieldinsourcetypeAndB
|appendcols [| inputlookup sourcetypeC.csv | fields fieldinA fieldinC]
1 Solution

woodcock
Esteemed Legend

Like this:

index="AandB" AND (sourcetype="sourcetypeA OR sourcetype="sourcetypeB") AND fieldinsourcetypeAndB="*"
| fields [only fields that we care about in A and B]
| stats values(*) AS * BY fieldinsourcetypeAndB
| lookup sourcetypeC.csv fieldinC AS fieldinA

View solution in original post

woodcock
Esteemed Legend

Like this:

index="AandB" AND (sourcetype="sourcetypeA OR sourcetype="sourcetypeB") AND fieldinsourcetypeAndB="*"
| fields [only fields that we care about in A and B]
| stats values(*) AS * BY fieldinsourcetypeAndB
| lookup sourcetypeC.csv fieldinC AS fieldinA
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...