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!

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 ...

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...