Kapacitor alerting TICK script is not working as it should. Since version v1.1, it seems the window tick doesn’t work. Right now every time something happens…kapacitor sends an alert, when it should be checking every X time for a period of X time.
I’ve been using Influxdb, Kapacitor, Grafana and Telegraf.
Right now, I am fetching only cpu, memory and disk metrics.
On kapacitor I have the following tick scripts for memory
var all = stream
|from().measurement('mem')
.groupBy('host')
all
|window()
.period(8m)
.every(10m)
|alert()
.message('{{.Name }} on {{index .Tags "host"}} is {{ .Level }} | value: {{ index .Fields "available_percent" }}')
.warn(lambda: "available_percent" < 10.0)
.warnReset(lambda: "available_percent" > 10.0)
.crit(lambda: "available_percent" < 5.0)
.critReset(lambda: "available_percent" > 5.0)
the problem is that Kapacitor is not checking the window and every time the memory passes any of the warn or crit values……it sends an alert to our alert management service.
I have more than 10 different tick scripts for disk, cpu and memory and in all of them the “window” doesn’t work.
Also Kapacitor doesnt wirte logs about it……I have the logs set up to write every single thing that influx, telegraf and kapacitor is doing and there is NO DATA REGARDING HOW THE ALERT WAS TRIGGERED.