Alerting

Creating an alert based off of an anomalous value in search result

noch1999
New Member

Hello Splunk

I am trying to set an alert when a result is much higher than the other rows.

A simplified search of:

index="my index" user=* | top limit=200 

returns a row of users which usually has a high count of 150-200, but during some events this will obviously differ so I can't just use a static value. Is there a way I can do something like:

when (count.row1 > 5xcount.row2) {trigger alert} 

 

Thank you in advance.

Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

If you are only interested in the ratio of the first to the second, you could do something like this

index="my index" user=* | top limit=2 | eventstats sum(count) as total | head 1 | eval ratio=count/(total - count)
0 Karma
Get Updates on the Splunk Community!

Index This | Why did the turkey cross the road?

November 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...