Alerting

Alert for No events indexed for Sourcetypes

peter_gianusso
Communicator

Trying to create an alert that given multiple sourcetypes, will alert when there are no events by sourcetype in the last 2 hours

So if my single saved search includes 6 sourcetypes and 2 have not had an event indexed in the last 4 hours, then the alert will contain a list of the 2 sourcetypes.

I tried the following:
sourcetype="PROD_FIC_NJ_OMNI_LOG" OR sourcetype="PROD_HODA_MN_OMNI_LOG" OR sourcetype="PROD_HODA_PA_OMNI_LOG" OR sourcetype="PROD_NBCAP_OMNI_LOG") |bucket _time span=4h| stats count by sourcetype

But it only returns the sourcetypes that have events. Not the sourcetypes that have no events

Thanks!!

Tags (2)
0 Karma
1 Solution

Ayn
Legend

A much quicker and more efficient approach would be to use the metadata command instead (if these sourcetypes you define have gotten events at least at some point).

| metadata type=sourcetypes | search sourcetype="PROD_FIC_NJ_OMNI_LOG" OR sourcetype="PROD_HODA_MN_OMNI_LOG" OR sourcetype="PROD_HODA_PA_OMNI_LOG" OR sourcetype="PROD_NBCAP_OMNI_LOG" | where lastTime<now()-14400

View solution in original post

Ayn
Legend

A much quicker and more efficient approach would be to use the metadata command instead (if these sourcetypes you define have gotten events at least at some point).

| metadata type=sourcetypes | search sourcetype="PROD_FIC_NJ_OMNI_LOG" OR sourcetype="PROD_HODA_MN_OMNI_LOG" OR sourcetype="PROD_HODA_PA_OMNI_LOG" OR sourcetype="PROD_NBCAP_OMNI_LOG" | where lastTime<now()-14400
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...