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!

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 ...