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!

Announcing Scheduled Export GA for Dashboard Studio

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

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...