Splunk Search

searching for events in a source based on value of another source

kenbaugher
Path Finder

I have two sources that I'd like to combine/join or search on one based on the other.

Source 1 - has two fields  name & date

Source 2  - has several fields including name & date, field1, fields2, field3, etc.

 

I'd like to get the most recent date for a specific name from source 1, and show only the events in source 2 with that name & date

Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

You can use the first search as a subsearch to filter the second search - something like this

<search source2> [search <search source1> | stats latest(date) as date by name]
0 Karma

kenbaugher
Path Finder

Thank you, I had to play around with my search a bit, but this overall syntax was the trick

0 Karma
Get Updates on the Splunk Community!

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

 Prepare to elevate your security operations with the powerful upgrade to Splunk Enterprise Security 8.x! This ...

Get Early Access to AI Playbook Authoring: Apply for the Alpha Private Preview ...

Passionate about security automation? Apply now to our AI Playbook Authoring Alpha private preview ...

Reduce and Transform Your Firewall Data with Splunk Data Management

Managing high-volume firewall data has always been a challenge. Noisy events and verbose traffic logs often ...