Alerting

How to create a custom type of alert?

amitrinx
Explorer

Hi,
I want to create alert when for 5 consecutive minutes the threshold breaches 70% ?

The query I wrote is:

sourcetype="os" identity_operation="GetUser" minutesago= 1
| eval EndpointName = "Get User" | stats count by EndpointName
| eval message = case(count >= 1 * 1200,"100% alert",
count >= 0.9 * 1200,"90% alert",
count >= 0.8 * 1200,"80% warning",
count >= 0.7 * 1200,"70% warning")
Labels (3)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @amitrinx,

you have to insert an activation threshold, something like this:

sourcetype="os" identity_operation="GetUser" minutesago= 1
| rename "Get User" AS EndpointName
| stats count by EndpointName
| where count>= 0.7 * 1200
| eval message = case(count>=1*1200,"100% alert",
count>=0.9*1200,"90% alert",
count>=0.8*1200,"80% warning",
count>=0.7*1200,"70% warning")

otherwise, your alert is always triggered also for values less than your threshold.

Ciao.

Giuseppe

0 Karma
Get Updates on the Splunk Community!

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

A Guide To Cloud Migration Success

As enterprises’ rapid expansion to the cloud continues, IT leaders are continuously looking for ways to focus ...

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...