Вопрос

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

Это было полезно?

Решение

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()

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top