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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...