Hi everyone I would like to trigger deadman alarms when I no longer receive measurements for a particular sensor. My code is as follows:
var data = stream
|from()
.database(db)
.retentionPolicy(rp)
.measurement(measurement)
.groupBy(groupBy)
.where(whereFilter)
var trigger = data
|deadman(threshold, period)
.stateChangesOnly()
.message(message)
.id(idVar)
.idTag(idTag)
.levelTag(levelTag)
.messageField(messageField)
.durationField(durationField)
.mqtt('...')
.brokerName('...')
.qos(1)
|log()
The problem is that the checks are always done at the perfect time (for example if I set 60m the checks are made at 13:00, 14:00 and so on) but I would like the timer to start from the time of the last data point. If I get a measurement at 13:24 the alarm should go off at 14:24 (currently it will only go off at 15:00). How can I solve this problem? I tried to insert a window () with no success.
Thanks in advance