Alerting

How to create a search to only return the overall search average?

jimtan
New Member

Hi there,

I need to create an alert basing on average failure rate in 60 min. Here is my search sourcetype="mysourceType" AppID = "myApp" | eval Failed= if( myData> 0, 1, 0) | stats avg(Failed) as FailRate
The alert condition is search FailRate > 0.1

However the search returns the intermediate results before the search is complete. I want the alert generated only the search is complete in 60 min. I couldn't figure out to create a search only shows the final overall average for FailRate for the alert.

Any help is appreciated.

Thanks

Tags (1)
0 Karma

asimagu
Builder

maybe you could try adding a where clause at the end and then firing the alert if it finds an event

| where FailRate > 0,1

0 Karma

jimtan
New Member

Thanks, I have tried everything I know and it doesn't work because the alert gets triggered multiple times before of the immediate results from the search.

0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...