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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...