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!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...