Kapacitor Threshold Alerts not working

I have setup a simple threshold alert. Alert if the count of some data point is less than X. Here is the graph of the data point and the threshold.

And I would post a shot of my sad, empty alert page, but apparently new users to this forum aren’t allowed. I guess you’ll just have to believe me when I say, there are no alerts being created.

I have tried everything I could find searching around to no avail. How do I even begin to start debugging this? There is nothing useful in the Kapacitor docker logs.

Hi,
With my limited knowledge, here is a small tip to debug the things. It appears that you are using chronograf to set the alerts. When u enter
alerts tab --> Manage Tasks--> Build Alert Rule
After setting up the Rule, It will create a automatic TICK Script associated with the Alert Rule. I think it would be nice if you can copy paste the TICK script in the query. so that some one else can debug.

From above picture You can see that Every alert Rule has corresponding automatic generated TICK script.

Secondly don’t forget to enable the rule. In my case i disabled all of them - “Task Enabled” column.

Once you understand little bit of TICK scripts you can edit by adding http outputs node once in a while to see the data flow. example Problem with evaluation node - TICK script

Thanks for that! Alright, here is my TICK script.

var db = ‘system_events’

var rp = ‘autogen’

var measurement = ‘data_received’

var groupBy = []

var whereFilter = lambda: TRUE

var period = 1m

0s

var every = 30s

var name = ‘Untitled Rule’

var idVar = name

var message = ‘Testing.’

var idTag = ‘alertID’

var levelTag = ‘level’

var messageField = ‘message’

var durationField = ‘duration’

var outputDB = ‘chronograf’

var outputRP = ‘autogen’

var outputMeasurement = ‘alerts’

var triggerType = ‘threshold’

var crit = 5

var data = stream
|from()
.database(db)
.retentionPolicy(rp)
.measurement(measurement)
.groupBy(groupBy)
.where(whereFilter)
|window()
.period(period)
.every(every)
.align()
|count(‘value’)
.as(‘value’)

var trigger = data
|alert()
.crit(lambda: “value” < crit)
.message(message)
.id(idVar)
.idTag(idTag)
.levelTag(levelTag)
.messageField(messageField)
.durationField(durationField)

trigger
|eval(lambda: float(“value”))
.as(‘value’)
.keep()
|influxDBOut()
.create()
.database(outputDB)
.retentionPolicy(outputRP)
.measurement(outputMeasurement)
.tag(‘alertName’, name)
.tag(‘triggerType’, triggerType)

trigger
|httpOut(‘output’)

Well I got this working using the example TICK-docker 1.3 compose file

In case, if u r not aware. There is sandbox, which is full TICK stack from influxdb.

Hi, @NickBusey! How did you solve this issue? Which example did you use?