Splunk Search

How to create a report on a user, their ad-hoc and scheduled searches, and the IP that is running them?

a212830
Champion

Hi,

Is there a way to run a report that shows a specific user, their ad-hoc and scheduled searches, and the ip that is running them?

Tags (3)
0 Karma

somesoni2
Revered Legend

This can get you started (minus the IP thing)

index=_audit host=CCFS-SH2 action=search user!=splunk-system-user search_id=* (info=granted OR info=completed) |rex field=apiStartTime "'(?<start_time>[^']+)'" |rex field=apiEndTime "'(?<end_time>[^']+)'" | eval search_id = trim(if(isnull(search_id), id, search_id), "'") | eval run_time_min=round(total_run_time/60,2) |eval range=if(start_time=="ZERO_TIME","All Time", tostring(strptime(end_time, "%a %b %d %H:%M:%S %Y") - strptime(start_time, "%a %b %d %H:%M:%S %Y"),"duration"))
0 Karma

a212830
Champion

The ip is key - trying to find out where some of these searches are coming from...

0 Karma
Get Updates on the Splunk Community!

Splunk Observability Cloud's AI Assistant in Action Series: Auditing Compliance and ...

This is the third post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

What You Read The Most: Splunk Lantern’s Most Popular Articles!

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...