0

I have a situation where I would like to detect when a source has not sent event into the systems for more than 24 hours. When this pattern is recognized, I would like to be able to retrieve the last know event (which may be days) the source did send something. I would like this check to be done every 24 hours. I've followed the 'ATM' type example and came up with the following, pretty simple.

select a.value from pattern[every (time:interval(24 hours) and not a=Event)

This notify my update listener when 24 hour has elapsed and no event a. But how do I get previous know? I thought about using the prev or std:lastevent functions but I need a data window to select from, wasn't sure where to put that.

thanks

user2219560
  • 95
  • 1
  • 8

1 Answers1

0

You could use "prior", or join in the last event like the example below shows: select a.value, * from pattern[every (time:interval(24 hours) and not a=Event)], Event.std:lastevent()

user650839
  • 2,594
  • 1
  • 13
  • 9
  • Using the join option was the answer! Just as an FYI, I tried the prev function but because I was working with dates I was forced to use some of the date functions. What I found was the result of the date functions did not allow me to use prev. where (prev(a.timeStamp).toMillisec()-a.timeStamp.toMillisec()) > (some number). – user2219560 Dec 19 '13 at 12:46