Alerting

Can we generate a real-time alert on static data?

vrmandadi
Builder

Hello Experts,

I have a .json sample data file which has 700 events and I have done the below search:

index=abc source=json response_code=123 |stats count      [all time]

output

count
5

Now I am saving this result as an alert by

save as alert ->realtime->number of results -> greater than 6 ->in 5 minutes

and saved it as email type alert. Then I pushed again some sample data to the file so that it matches the criteria and an alert is generated, but I don't see any alert triggered nor an email. Is there any way we can generate an alert, or it should be real-time data to generate alert?

Tags (2)
0 Karma

gfreitas
Builder

Hi,

Looks like you set up the alert to find more than 6 events, but the sample results you showed shows just one line. You can change the trigger to "Custom" instead of "Number of results" and set the condition to "search count > 6"

Hope this helps

0 Karma

somesoni2
Revered Legend

What's the timestamp on the data, is it latest?

0 Karma

vrmandadi
Builder

the newly generated data has yesterday date 4/19/16
8:02:01.128 AM

0 Karma

somesoni2
Revered Legend

And the alert search is a real-time search with time windows of 5 min? Well regardless, after you put "| stats count", the number of results returned is 1, so the alert condition fails...

vrmandadi
Builder

ok.I actually tried pushing some data into file and set the alert to real time ,but i dont see any alert generated.But when I did a scheduled alert with

earliest time : -5min@min
latest time: now

cron: */5 * * * *

It generated an alert

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 ...