Splunk Search

How to find long-running searches in Splunk, with execution time in mins?

shinde0509
Explorer

How to find long-running searches in Splunk, with execution time in mins.

Labels (2)
Tags (1)
0 Karma

shinde0509
Explorer

Not having access to Monitoring Consoles, SO using SPL want to create dashboard.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

If you don't have access to the MC then you probably don't have access to the _internal index, which is where run times are reported.

---
If this reply helps you, Karma would be appreciated.
0 Karma

shinde0509
Explorer

Having access to _internal and _audit Indexes.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

This should get you started.

(index=_audit host=* action=search sourcetype=audittrail search_id!="rsa_*") 
| eval user = if(user="n/a", null(), user) 
| eval search_id=replace(search_id, "'(.*)'", "\1") 
| eval search=if(isnull(savedsearch_name) OR savedsearch_name=="", search, savedsearch_name) 
| stats min(_time) as _time, values(user) as user, max(total_run_time) as total_run_time, first(search) as search, first(apiStartTime) as apiStartTime, first(apiEndTime) as apiEndTime by search_id
---
If this reply helps you, Karma would be appreciated.

richgalloway
SplunkTrust
SplunkTrust

The Monitoring Console has a dashboard for that.  See Settings->Monitoring Console->Search->Search Usage Statistics: Instance then scroll down.

---
If this reply helps you, Karma would be appreciated.
0 Karma

jo
New Member

very good!!

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

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