Jump to content


Delaying email for an ongoing alert

  • Please log in to reply
1 reply to this topic

#1 billwatson



  • Members
  • PipPip
  • 14 posts

Posted 23 April 2016 - 03:28 AM

Hello everyone :)


I'm trying to figure out a way to delay an email alert so that I'm not getting an alarm every time my data stream updates, but rather an email when the stream first meets the if condition, and then an email say every 10 minutes after.


In the past I've just disabled the listener until the problem is sorted, but I figure I'm missing out on learning something new about Groovy's timer and timertask classes.


If anyone could help or point me in the right direction I'll buy you beer!




#2 RTCeables



  • Members
  • Pip
  • 5 posts

Posted 04 October 2016 - 04:54 PM

Hi Bill,


Just curious, did you ever come up with a solution here, or that beer still available :-).


I am not sure the timer class will help you here as for me I think this is linked more to a logic table.


I would think that you should create a separate dummy service entry here which you could use to create a trigger. So it could be something like this.


Firstly you set up a dummy service ID (I refer to this in example as EML_Service).


So when you get your first Alarm event. Create some listener logic to pick this up.




If Alarm Event and no EML_Service event data found (or if one is found but really well over some max time limit), then post an EML_Service event to your data stream. Then here you create some EML_Service trigger event logic which will trigger when this event is received and it is this event that will send the email not the alarm event.


Then when you get your next alarm event....

it is here that the "Else" part of the listener logic kicks in, namely:


Else If Alarm Event and EML_Service event and previous EML_Service > 10 minutes and < max time interval then post another EML_Service event to your data stream. Your EML_Service trigger logic will then trigger again.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users