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
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...