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!

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 ...