influxdata / influxdata/kapacitor
Deadman in a batch not working
- Dominant language
- Go
- Stars
- 2.4k
- Forks
- 479
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 4
Description
Hello!
I'm using Kapacitor 1.3 and InfluxDB 1.2.
I really can't figure out what I'm doing wrong in this small script:
```
// DEFINE: kapacitor define deadman_alert -type batch -tick deadman_alert.tick -dbrp enerwhere.autogen
batch
|query(''' SELECT "mode" AS "value" FROM "enerwhere"."autogen"."trserver" ''')
.period(3h)
.every(30m)
|deadman(1.0, 2h)
.id('deadman')
.message('Deadman alert: less than 1 datapoint in 2h')
.log('/tmp/deadman_alert.log')
```
When doing a record and a replay on my database (knowing there are hours without data at some points) nothing is being written on the deadman_alert.log ...
Any idea?
PS: there is no example of deadman in a BatchNode on Kapacitor Documentation, only an example in a StreamNode is given -> https://docs.influxdata.com/kapacitor/v1.3/nodes/batch_node/#deadman
Contributor guide
Research direction
Start with the batch script in the issue and the Kapacitor batch-node deadman documentation linked there, then reproduce the record and replay against the stated InfluxDB setup. Check whether periods without data trigger the deadman node and write to /tmp/deadman_alert.log; done means explaining or correcting the batch behavior and documenting a working example if the documentation is incomplete.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- observability-sre
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100