Alerting

How to setup a simple alert on a simple search result/value

HattrickNZ
Motivator

How do I setup an alert based on the value returned from a search?

I havea simple search:
index=core ....| stats max(kpi) as kpi

This gives a value of 30,000

Now I want to set up an alert that when this goes below 10,000 to trigger an alert. I will use an email initially for testing.

How do I do this? Once I have the search ready I click Save as -> Alert and these options are presented

alt text

my specific query is around the Trigger Alert when. The options are:
1. Number of Results

2. Number of Hosts
3. Number of Sources
4. Custom

None of these seem to be what I want. I was expecting a value of search as an option in that when then value is <10,000 Alert me. What am I missing here? The custom option does not appear to offer anything.

I am reading here

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Try this query

index=core ....| stats max(kpi) as kpi | where kpi < 10000

And have the alert trigger when the number of events is not zero.

---
If this reply helps you, Karma would be appreciated.

HattrickNZ
Motivator

Just to confirm:
1/ when kpi is 9,000, then kpi< 10,000 is TRUE and a value will be returned from the search (e.g.9000), And the alert will alert.
2/ when kpi is 11,000, then kpi< 10,000 is FALSE and a value will NOT be returned from the search (e.g.No results found). No alert.

is the number of events is not zero relate to the value of 9,000 returned or No results found?
tks

0 Karma
Get Updates on the Splunk Community!

Technical Workshop Series: Splunk Data Management and SPL2 | Register here!

Hey, Splunk Community! Ready to take your data management skills to the next level? Join us for a 3-part ...

Spotting Financial Fraud in the Haystack: A Guide to Behavioral Analytics with Splunk

In today's digital financial ecosystem, security teams face an unprecedented challenge. The sheer volume of ...

Solve Problems Faster with New, Smarter AI and Integrations in Splunk Observability

Solve Problems Faster with New, Smarter AI and Integrations in Splunk Observability As businesses scale ...