Alerting

Alert condition to count total events instead of count by

pinalshah341
Loves-to-Learn

I have the below sample splunk query that returns me count by Errors -

index="abc" earliest=-1h "/payment_items" "Exception"

| rex field=_raw "Exception:\s"(?.*)""
| fields request_id, Error

| dedup request_id
| eval Errors=case(Error like "%invalidArgument%","InvalidArgument", Error like "%ApplicationException%", "ApplicationException", Error like "%", Error)
| stats count by Errors
| sort by count desc

When setting up alert, I want to trigger an alert when the total count of error (not the count by individual error) is greater than 10.

How can I achieve that ? Please help ASAP

0 Karma

sandeepmakkena
Contributor
| stats count(Error) as ErrorCount
| where count>10

This should do it!

Please accept the answer if it helped, thanks!

0 Karma
Get Updates on the Splunk Community!

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

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...