Splunk Search

How to write a search to find related events correlating to a file name?

jgbricker
Contributor

I have a request to produce a table for our file sharing audit log that shows the Top Upload files listing the file that was uploaded, the user associated with the upload, then output the download user.

I'm having trouble crafting the search to correlate these events.

my fields are:
User
ItemName
Activity=Upload OR Activity=Download

The source is the same for both events

any ideas?

0 Karma
1 Solution

sundareshr
Legend

See if this gives you what you're looking for

.... | stats count(eval(activity="Upload")) as count values(eval(if(activity="Download", User, null()))) as DownloadUser by ItemName | sort - count

View solution in original post

sundareshr
Legend

See if this gives you what you're looking for

.... | stats count(eval(activity="Upload")) as count values(eval(if(activity="Download", User, null()))) as DownloadUser by ItemName | sort - count

Masa
Splunk Employee
Splunk Employee

Missing Uploaded user name... 🙂 But, basically this is great!

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...