Splunk Search

Avg and most common Search time frame

cboillot
Contributor

A quick search didn't find anything. I am looking to determine what the most used and avg Search window is. I.e. how far back are most of my users actually looking. Is this possible?

Labels (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Perhaps this will get you started.

index=_audit sourcetype="searchactivity:searchhistory"
| stats mode(earliest) as modeTime, avg(earliest) as avgTime
| fieldformat avgTime=strftime(avgTime,"%c")
---
If this reply helps you, Karma would be appreciated.
0 Karma

cboillot
Contributor

hmm... The only sourcetype I have for the audit is audittrail.

Tags (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Hmm...  Perhaps that sourcetype is unique to Splunk Cloud instances.  Here's another query to try.  It gives a list of relative times rather than a specific date, but that may be more helpful.

index=_audit "earliest=" | stats values(earliest)
---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

WATCH NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If exploited, ...

Enter the Splunk Community Dashboard Challenge for Your Chance to Win!

The Splunk Community Dashboard Challenge is underway! This is your chance to showcase your skills in creating ...

.conf24 | Session Scheduler is Live!!

.conf24 is happening June 11 - 14 in Las Vegas, and we are thrilled to announce that the conference catalog ...