Getting Data In

How to audit REST api initiated searches?

the_wolverine
Champion

I'm looking to audit REST API search activity and I'm unable to locate any logging of REST API initiated searches. I just need to know what queries are being run and by whom.

0 Karma
1 Solution

somesoni2
Revered Legend

Following query provides list of all the searches being executed by all the users (including scheduled searches and REST API searches

index=_audit action="search" search="*"

Further, you can differentiate Scheduled searches with adhoc searches using following:

|eval adhoc=if(NOT user="splunk-system-user",1,0) | eval schd=if(user="splunk-system-user",1,0)

View solution in original post

somesoni2
Revered Legend

Following query provides list of all the searches being executed by all the users (including scheduled searches and REST API searches

index=_audit action="search" search="*"

Further, you can differentiate Scheduled searches with adhoc searches using following:

|eval adhoc=if(NOT user="splunk-system-user",1,0) | eval schd=if(user="splunk-system-user",1,0)

the_wolverine
Champion

We have a case where they are not being logged so I'm going to track it down. Thanks for your response.

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...