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!

Prove Your Splunk Prowess at .conf25—No Prereqs Required!

Your Next Big Security Credential: No Prerequisites Needed We know you’ve got the skills, and now, earning the ...

Splunk Observability Cloud's AI Assistant in Action Series: Observability as Code

This is the sixth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Splunk Answers Content Calendar, July Edition I

Hello Community! Welcome to another month of Community Content Calendar series! For the month of July, we will ...