Alerting

how to see if event didnt occur after 15 min from other event

ivana27
Path Finder

Hi all,

i am new to Splunk and i need to create search which will show that event with end didnt occur after 15 min from start event. Please help me.

This is start event: [Information] Downtime start:16/12/2020 18:13:07.043

And this one shows end of below one: [Information] Downtime start:16/12/2020 18:13:07.043, end:17/12/2020 08:09:57.505

I would like check if duration from start event extended 15 min to occur end event.

Thank you very much

Labels (1)
Tags (2)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Since the start and end times are in one event, we just need to convert them to epoch form and then compare them.

index=foo "end:"
| rex "start: (?<startTime>[^,]+)"
| rex "end: (?<endTime>.*)"
| eval start=strptime(startTime, "%d/%m/%Y %H:%M:%S.%3N"), end=strptime(endTime, "%d/%m/%Y %H:%M:%S.%3N")
| eval diff = end - start
| where diff > 900
---
If this reply helps you, Karma would be appreciated.

ivana27
Path Finder

Thank you for quick reply. Actually they are 2 different events. Trick is here that i need to predict if end event will not occur 15 min from start one, i can not wait to see when end will occur if duration lasts more then 15 min. Please if you have some hint i would really be grateful.

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...