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!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...