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!

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...

Cloud Monitoring Console - Unlocking Greater Visibility in SVC Usage Reporting

For Splunk Cloud customers, understanding and optimizing Splunk Virtual Compute (SVC) usage and resource ...

Automatic Discovery Part 3: Practical Use Cases

If you’ve enabled Automatic Discovery in your install of the Splunk Distribution of the OpenTelemetry ...