Splunk Search

How to find 10 most active folders by their action of uploading documents

splunkman341
Communicator

Hey guys,

So I am trying to create a search that fetches the top 10 most active OOIDs (Organization ID Folder) by their activity of AOIDS (associate IDS) uploading documents into said folders. The idea is to get the number of AOIDS for each OOID.

For example, you have three companies:

Company A XYZ(OOID) has uploaded 300 documents, but only 20 AOIDS uploaded those documents

Company B ABC(OOID) has uploaded 200 documents, but 100 AOIDS uploaded those documents

The log of where I need to create the search out of is here:

Thanks for looking and please let me know if you have any questions!

0 Karma
1 Solution

woodcock
Esteemed Legend

Try this:

index = foo | stats dc(AOID) AS AOIDs by OOID | sort 10 - AOIDs

This judges "activity" not by raw activity but by the highest number of AOIDs that have any activity (which may not be correct); this judges by raw events:

index = foo | stats count dc(AOID) AS AOIDs by OOID | sort 10 - count

View solution in original post

woodcock
Esteemed Legend

Try this:

index = foo | stats dc(AOID) AS AOIDs by OOID | sort 10 - AOIDs

This judges "activity" not by raw activity but by the highest number of AOIDs that have any activity (which may not be correct); this judges by raw events:

index = foo | stats count dc(AOID) AS AOIDs by OOID | sort 10 - count

splunkman341
Communicator

You crushed the nail through the plywood, exactly what I wanted!

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Try this untested search:

index = foo | top AOID by OOID | table OOID AOID
---
If this reply helps you, Karma would be appreciated.
0 Karma

splunkman341
Communicator

It is generating events but no statistics or a table

0 Karma

richgalloway
SplunkTrust
SplunkTrust

I've updated my answer.

---
If this reply helps you, Karma would be appreciated.
0 Karma

splunkman341
Communicator

I just need the number of AOIDS per OOID. The AOID name is not needed in this instace

0 Karma

richgalloway
SplunkTrust
SplunkTrust

You put a regex tag on this question. Does that mean you don't have the OOID and AOID fields extracted?

---
If this reply helps you, Karma would be appreciated.
0 Karma

splunkman341
Communicator

Hi Rich and thanks for you're response,

I just checked and I actually do have them extracted, I just was not sure where to go from here

0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...