hi all
I have written the following tick script 

stream
    |from()
        .database('tech')
        .retentionPolicy('autogen')
        .measurement('passenger_queue')
    |log()
    |eval(
        lambda: if("host" == '172.30.2.198','true','false')
    )
        .as('val')
    |alert()
    .id('kapacitor passenger_queues alert')
       .message('{{ .Level }} {{ .ID }} /{{ index .Tags "host" }} has a 
 queue length :{{ index .Fields "value" }}')
       .info(lambda: "value" > 50)
       .warn(lambda: "value" > 70)
       .crit(lambda: "value" > 80)
       .stateChangesOnly()
       .email()
    |log()




on enbaling the script I get the following results in kapacitor show I GET 
THE FOLLOWING RESULT :



DOT:
digraph pass_alert {
graph [throughput="0.00 points/s"];

stream0 [avg_exec_time_ns="0" ];
stream0 -> from1 [processed="160"];

from1 [avg_exec_time_ns="2.856µs" ];
from1 -> log2 [processed="160"];

log2 [avg_exec_time_ns="0" ];
log2 -> eval3 [processed="160"];

eval3 [avg_exec_time_ns="550.728µs" eval_errors="0" ];
eval3 -> alert4 [processed="160"];

alert4 [alerts_triggered="0" avg_exec_time_ns="101.577µs" 
crits_triggered="0" infos_triggered="0" oks_triggered="0" 
warns_triggered="0" ];
alert4 -> log5 [processed="0"];

log5 [avg_exec_time_ns="0" ];
}

THE PROBLEM IS THAT alerts_triggered are coming 0 while avg exec time is 
non zero
as soon I as I remove the eval statement aleerts triggered start coming 

-- 

-- 
Remember to include the version number!
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/influxdb/7deca23b-4a62-439b-b1c6-49455b38a39a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to