Alerting

Alert based on meeting criteria over a certain time period

tblue
Engager

I'm trying to convert this Search into an alert

index=cj t=* earliest=-60m  | eval myfield=case(t >= .051, "Over", t <= .050, "Under") | timechart count by myfield |  eval Total=Over+Under |eval OverPerc=100*Over/Total | eval UnderPerc=100*Under/Total  | fields Total Under UnderPerc Over OverPerc

i've tried searchtimespanminutes but the output still shows in like 5 second increments.

I want to add ... |where OverPerc>= .1

But want it to be over say a 10 minute period, I want OverPerc to not exceed .1 over a given timeframe, even in real time, it should not alert if it's only matched one result, it should wait until it loads the 60 minutes or 10 minutes, or 5 minutes of data to make the match.

Thanks

Tags (1)
0 Karma

martin_mueller
SplunkTrust
SplunkTrust

To force your timechart into grouping larger spans of time together, change it like this:

... | timechart span=10m count by myfield | ...

In case you're getting false positives due to the clock being for example 02:00:05 and only one event occurred during those five seconds, you can add this:

... | timechart span=10m partial=f count by myfield | ...

That way buckets are discarded if the ten minute span isn't over yet.

0 Karma

tblue
Engager

BAHH, always trying to make it harder then it is.. Thanks this worked!

Get Updates on the Splunk Community!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...