Splunk Search

How to get the list of Adhoc Search and Saved search running by user in Audit logs.

harishsplunk7
Explorer

I need to get the  list of Adhoc Searches and Saved search running by user in Audit logs.

how to differentiate these searches in _audit logs, is there any specific keyword to identify the searches 

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Searches are in the audit log.  Saved searches will have a non-empty value in the savedsearch_name field.  The user name is in the user field.

index=_audit action=search
| table user savedsearch_name search
---
If this reply helps you, Karma would be appreciated.
0 Karma

harishsplunk7
Explorer

This is not working at all, We will get all the searches running in splunk. because there is no keyword to identify whether search is savedsearch or Ad-hoc search or Reports. 

0 Karma

richgalloway
SplunkTrust
SplunkTrust

As stated in my response, a saved search will have a non-empty value in the savedsearch_name field (keyword).  If savedsearch_name="" then the search is ad-hoc.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Mastering Data Pipelines: Unlocking Value with Splunk

 In today's AI-driven world, organizations must balance the challenges of managing the explosion of data with ...

The Latest Cisco Integrations With Splunk Platform!

Join us for an exciting tech talk where we’ll explore the latest integrations in Cisco + Splunk! We’ve ...

AI Adoption Hub Launch | Curated Resources to Get Started with AI in Splunk

Hey Splunk Practitioners and AI Enthusiasts! It’s no secret (or surprise) that AI is at the forefront of ...