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!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...