nathanielc / morgoth

Metric anomaly detection
http://docs.morgoth.io
Apache License 2.0
280 stars 31 forks source link

issue with kapacitor tick script and template #59

Closed pdl86 closed 6 years ago

pdl86 commented 6 years ago

hello

wil will to "template" a working tikc script, for Kapacitor, I encouter issue with using variable in the SELECT cuase of a batch node:

here is some part of the script:

var measurement string var groupBy string var indicator string var offset duration var period duration var every duration var shift = offset ..... var prev_period = batch |query('SELECT mean(indicator), stddev(indicator) from .measurement(measurement)') .groupBy('devaddr') .offset(offset) .period(period) .every(every) .align() |shift(shift)

when trying to "load" the template , I've got

error reloading associated task xxxxxxxxxx: failed to parse InfluxQL query: found ., expected identifier at line 1, char 49

same error with .db(db).rp(.rp) with db and rp defined as var string. same without the "."

any hints ? thans in advance ( Kapacitor 1.4)

regards Philippe

pdl86 commented 6 years ago

closed as posted to the wrong "projetc"