Alerting

Alert if text is not present

peter_gianusso
Communicator

I want to alert if the text "OmniKrnlService.main: starting, service name" is not present in a log file by 8:30 AM every day.

I know how to alert when text is present but not how to alert when it's not present.

Tags (2)
0 Karma
1 Solution

gkanapathy
Splunk Employee
Splunk Employee

Seems fairly straightforward. You search for the text in the file over the appropriate time range (e.g., midnight to 8:30am, run at 8:45am). Then send an alert if the count of results is zero, or less than 1. That is an option available when configuring alerts.

View solution in original post

0 Karma

ArthurGautesen
Path Finder

index=WhatYouChoose "OmniKrnlService.main" earliest=-0d@d latest=-0d@d+510m | stats count | eval Flag=if(count>0,1,0) | search Flag=1

This would have you searching between midnight and 8:30am each day, but there isn't a solid way to decimal point it

(510 minutes from midnight is 8:30am)

| search Flag=1 would mean you found results
| search Flag=0 would mean you did not find results

0 Karma

gkanapathy
Splunk Employee
Splunk Employee

Seems fairly straightforward. You search for the text in the file over the appropriate time range (e.g., midnight to 8:30am, run at 8:45am). Then send an alert if the count of results is zero, or less than 1. That is an option available when configuring alerts.

0 Karma
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

December 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...