Essentially, I would like Kapacitor to ONLY send alerts when the critical value defined in my lambda function exceeded.
I DO NOT want to get alerts that have the status of “OK”.
My expectation of the tick script was that it would ONLY alert when the critical value was exceeded. However, that is not the case. I receive “OK” alerts with values less than what is defined in the lambda function.
I have looked at the StateChangesOnly
method. However, I would like to receive all “CRITICAL” alerts not just going from “OK” to “CRITICAL”.
Here is my TICKScript:
stream
|from()
.measurement('some_metric')
.where(lambda: "client_key" == 'some_unique_key' AND "host" == 'some_host_name')
|alert()
.crit(lambda: "value" > 11)
.log('/tmp/some_auto_alert.log')
.post('http://example.com/some/endpoint')