Alerting

How to trigger an alert when my search returns no 0 events from an index for the last 30 minutes?

kjamsheed
New Member

Trying to get an alert triggered when my custom search returns 0 events.
The search would include index, sourcetype, and custom field.

0 Karma

sideview
SplunkTrust
SplunkTrust

One solution would be this sort of search -

index=foo sourcetype=bar customField=baz | stats count | where count="0"

This will return 1 result row (with count=0) when there are no results, and it will return zero rows when there are any results.

So therefore you can just use default "trigger when there are some rows" behavior on your alert.

Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...