With a subtle change (if anyone interested) Seems that "OK" state is fired
only once when the alert recovers, according to documentation
Events are sent to handlers if the alert is in a state other than 'OK' or
> the alert just changed to the 'OK' state from a non 'OK' state (a.k.a. the
> aler
Ah, yes the lambda expressions as vars was added with the 1.0 beta.
Glad its working!
On Thursday, June 16, 2016 at 11:29:34 AM UTC-6, Carlos Peñas wrote:
>
> mmm ok, got it :)
>
> It seems all ok except for the
>
> var w = lambda: "usage_idle" < 40
> var c = lambda: "usage_idle" < 20
>
>
> Ka
mmm ok, got it :)
It seems all ok except for the
var w = lambda: "usage_idle" < 40
var c = lambda: "usage_idle" < 20
Kapacitor complains as
invalid TICKscript: parser: unexpected 9 line 1 char 9 in "var w = lambda: "
u". expected: "number","string","duration","identifier","TRUE","FALSE","==
Carlos,
What you have looks good.
You are correct that to get different behaviors you need to use two
different alert nodes.
Here is a example of what I think you want to do:
var warn = lambda: "usage_idle" < 40
var crit = lambda: "usage_idle" < 20
var stats = stream
|from()