[influxdb] Re: Several doubts about AlertNodes and tickscript in kapacitor

2016-06-16 Thread Carlos Peñas
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

[influxdb] Re: Several doubts about AlertNodes and tickscript in kapacitor

2016-06-16 Thread nathaniel
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

[influxdb] Re: Several doubts about AlertNodes and tickscript in kapacitor

2016-06-16 Thread Carlos Peñas
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","==

[influxdb] Re: Several doubts about AlertNodes and tickscript in kapacitor

2016-06-15 Thread nathaniel
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()