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!

Observability Unlocked: Kubernetes Monitoring with Splunk Observability Cloud

  Ready to master Kubernetes and cloud monitoring like the pros?Join Splunk’s Growth Engineering team for an ...

Wrapping Up Cybersecurity Awareness Month

October might be wrapping up, but for Splunk Education, cybersecurity awareness never goes out of season. ...

🌟 From Audit Chaos to Clarity: Welcoming Audit Trail v2

&#x1f5e3; You Spoke, We Listened  Audit Trail v2 wasn’t written in isolation—it was shaped by your voices.  In ...