Kapacitor alerting TICK script is not working as it should

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
	.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.

It sounds like you are expecting the alert to only trigger if all the data in the window matches the condition. That is not the default behavior but can be enabled by using the .all property of the alert node. See AlertNode | InfluxData Documentation Archive

As for the logs, Kapacitor will log all alerts that are triggered at DEBUG level, if you have DEBUG level logging turned on and still do not see any information about triggered alerts then something is wrong and we should dig in.