Dashboards & Visualizations

How to not send the alert when it does not contain any data

aditsss
Motivator

Hi Everyone,

I have set one alert as below:

index=abc ns=c2 ("NullPointerException" OR "IllegalStateException" OR "RuntimeException" OR "IllegalArgumentException" OR "NumberFormatException" OR "NoSuchMethodException" OR "ClassCastException" OR "ParseException" OR "InvocationTargetException" OR "OutOfMemoryError")| rex "message=(?<ExceptionMessage>[^\n]+)"|eval _time = strftime(_time,"%Y-%m-%d %H:%M:%S.%3N")|cluster showcount=t t=0.9|table app_name, ExceptionMessage,cluster_count,_time, environment, pod_name,ns|dedup ExceptionMessage,pod_name|rename app_name as APP_NAME, _time as Time, environment as Environment, pod_name as Pod_Name,cluster_count as Count

And I am sending it through via mail.

My requirement is when there is no data no alert should be send .

Can someone guide me on that.

Thanks in advance

 

Labels (2)
0 Karma
1 Solution

rnowitzki
Builder

Hi @aditsss,

This should be already set if you use the default trigger condition.

There is an area in the alert setting where you set "Trigger alert when"  -> select "Number of Results"  -> select "is greater than" type in "0".

So it would only fire the alert, when there is at least one result.


Ralph

 

--
Karma and/or Solution tagging appreciated.

View solution in original post

rnowitzki
Builder

Hi @aditsss,

This should be already set if you use the default trigger condition.

There is an area in the alert setting where you set "Trigger alert when"  -> select "Number of Results"  -> select "is greater than" type in "0".

So it would only fire the alert, when there is at least one result.


Ralph

 

--
Karma and/or Solution tagging appreciated.
Get Updates on the Splunk Community!

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

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

Stronger Security with Federated Search for S3, GCP SQL & Australian Threat ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Accelerating Observability as Code with the Splunk AI Assistant

We’ve seen in previous posts what Observability as Code (OaC) is and how it’s now essential for managing ...