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 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...