Splunk Search

need help with search logic

zacksoft_wf
Contributor

I am running this in Splunk ES (Enterprise Security). My objective is to find out those savedsearch_name whose average run time is greater than 300. Need some assistance in crafting the logic.

Here is my SPL so far....

index=_internal sourcetype=scheduler savedsearch_name=* `WF2020_1797_MA_active_es_shd` ACCELERATE run_time>1
| rex field=savedsearch_name "_ACCELERATE_DM_(?<savedsearch_name>.*?)_ACCELERATE_"
| search savedsearch_name!="Splunk_SA_CIM_Splunk_Audit.Modular_Actions" savedsearch_name!="Splunk_SA_CIM_Splunk_Audit.View_Activity"
| timechart span=5m avg(run_time) AS avg_run_time by savedsearch_name useother=f limit=0

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

Try something like this

index=_internal sourcetype=scheduler savedsearch_name=* `WF2020_1797_MA_active_es_shd` ACCELERATE run_time>1
| rex field=savedsearch_name "_ACCELERATE_DM_(?<savedsearch_name>.*?)_ACCELERATE_"
| search savedsearch_name!="Splunk_SA_CIM_Splunk_Audit.Modular_Actions" savedsearch_name!="Splunk_SA_CIM_Splunk_Audit.View_Activity"
| stats avg(run_time) AS avg_run_time by savedsearch_name
| where avg_run_time > 300

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust

Try something like this

index=_internal sourcetype=scheduler savedsearch_name=* `WF2020_1797_MA_active_es_shd` ACCELERATE run_time>1
| rex field=savedsearch_name "_ACCELERATE_DM_(?<savedsearch_name>.*?)_ACCELERATE_"
| search savedsearch_name!="Splunk_SA_CIM_Splunk_Audit.Modular_Actions" savedsearch_name!="Splunk_SA_CIM_Splunk_Audit.View_Activity"
| stats avg(run_time) AS avg_run_time by savedsearch_name
| where avg_run_time > 300
Get Updates on the Splunk Community!

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Introducing the Splunk Community Dashboard Challenge!

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

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...