influxdata / influxdata/kapacitor

[Q&A] [HELP] Kapacitor: change synchronization time

Open
#2,682 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
2.4k
Forks
479
Avg merge
4d 16h
Merged PRs (30d)
4

Description

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

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the deadman(period) behavior and the attempted window() configuration described in the issue. Determine whether checks can be anchored to the last measurement, and document the supported behavior or required change for triggering an alarm one period after that measurement.

Written by the indexing model from the issue text.

Assessment

Domain
observability
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.