Convert alerts from Kapacitor to infux2

Hi, recently I moved from Influxdb v1 to v2. I’m still using Kapacitor for the alerting. I’m trying to port all the Kapcitor rules to the influx2 alerts. With the Kapacitor there is resolution from crit to OK. I don’t see this in the influx2 alerting. Am I missing somthing?

An example of “server is down” that I’m using in the kapacitor:

|query(‘’’ SELECT mean(usage_user) FROM “collectd”.“default”.“cpu” where “host” !~ /(baba)|(dod)/ ‘’')
// |deadman(0.0000001, 10m)

    .crit(lambda: "emitted" < 0.0000001)
    .message('server: {{ index .Tags "host" }} {{ if eq .Level "OK" }}OK{{ else }}error - no data receive{{ end }}')

Thank you