Splunk Search

how to refer to data between 2 sourcetypes

sirching
Loves-to-Learn Lots

I am running a search against my windows event logs, lets call it sourcetypeA.  I need to use the IP address obtained form sourcetypeA to lookup up the  host information from sourcetypeB.   The end result needs to display the timestamp and other information from sourcetypeA and use the host information from sourcetypeB.  Subsearching so far has not seem to resolve the problem.   I merely need to use sourcetypeB as sort of a lookup table to plugin the host information found.

Labels (1)
0 Karma

isoutamo
SplunkTrust
SplunkTrust

Hi

you could try something like:

index=<your index> (sourceteype=A OR sourcetype=B)
| eval hostA=if(sourcetype=="A", host,null()), hostB=if(sourcetype="B", host, null())
| stats earliest(_time) as _time values(*) as * by src 
| table _time src hostB <other fields from sourcetypeA>

Where src is IP Address.

r. Ismo 

0 Karma
Get Updates on the Splunk Community!

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Introducing the Splunk Community Dashboard Challenge!

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

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...