Domanda

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

È stato utile?

Soluzione

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top