Splunk Search

If found result wait 15 minutes and search for other result, alarm if not found

Gord1020
Loves-to-Learn Lots

Hi All,

I'm trying to figure out a way to setup a splunk alert to do the following...

When the string "GFX_On" is found in our log there should always be a "GFX_Off" string found no longer than 15 minutes after.

We want splunk to alarm if it doesn't find the "GFX_Off" within 15 minutes of the last "GFX_On" it saw.

Basically this is a system that fires Graphics on and off on a video production system. We want to get alerted if the "GFX_Off" command doesn't fire into our logs within 15 minutes.

Hope this makes sense. Would really appreciate any help as I'm not even sure where to start.

I think I would need to do an if statement of some kind in the search.

Thanks!

Labels (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

See if this helps.

```Read all GFX_On and GFX_Off events```
index=foo ("GFX_On" OR "GFX_Off")
```Keep the most recent event```
| head 1
```Check if it's an On event with a timestamp before 15 minutes ago```
| where (searchmatch("GFX_On") AND _time < relative_time(now(), "-15m"))
---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

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!

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

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...