Hi,
I need to reset alert node state on such way that stateChangesOnly() will allow to spawn alert event.
For example:
if my task in in CRITICAL state i want to change it to OK and to see if it spawns critical on the next iteration.
Is it possible?
my current tick scirpt:
var period = 10s
var every = 60s
var data = batch
|query(‘SELECT min(“value”) as “value” FROM <metric_name>")
.period(period)
.every(every)
var alert = data
|alert()
.id(’{{index .TaskName }}’)
.message(’{{ .ID }} is {{ .Level }} value:{{ index .Fields “value” }} ')
// Change threshold to thresholds
.crit(lambda: “value” > 10.0)
alert
.stateChangesOnly()
.exec()