Kapacitor - Send OK alerts when info, warn or crit are not triggered


I have built some TickScripts and to test them used the log(/foopath) function.

I didn’t find the way to send OK alerts when .info,.warn or .crit nodes are not triggered in my system.

  • Is there some way to set up those OK alerts?

Thank you!

Can you share some example data and what you expected to happen?

Kapacitor will send OK alerts when the data no longer matches any of the info, warn or crit conditions.

Hi, thanks for answering.

Sorry for lack of info.

I’m using Kapacitor 1.3.0 with InfluxDB 1.0.0.

I created the attached TickScript, which is streaming incoming data with an interval of 1m and evaluating the field myField in order to create an info, warn and crit alert.

As I said, it is triggering the INFO,WARN and CRIT alerts and OK from state recovering correctly, but I need to get the current status and not only when the status is changed or an alert has triggered.

With the following TickScript, the output is:

The results:

  • Log is empty until an alert is triggered/recovered
  • Threshold alert httpOut is “empty” with the following message until an alert is triggered/recovered: {"series":null}

Note: I played with stateChangesOnly(), stateChangesOnly(period) without success

var data = stream
//Generates an alert, later we can handle it
var trigger = data
        //Different thresholds:
        .info(lambda: field > if("threshold" == '1', info_th1, info_th2))
        .warn(lambda: field > if ("threshold" == '1', warn_th1, warn_th2))
        .crit(lambda: field > if ("threshold" == '1', crit_th1, crit_th2))



I am also looking for this functionality. Any updates?