b***@rkrepsilon.com
2017-01-09 06:45:06 UTC
Hi,
I have the following :
Kapacitor, v1.1.1
InfluxDB, v 1.1.1
Telegraf, v1.1.2
I am having a little bit of trouble with the |last() function. (Or maybe my
understanding of it)
My TICK script gets loaded into Kapacitor with out any error.
After some time the "kapacitor show tasks" command lists the task as
"Executing:false".
I guess this is when the task has its first match on the incoming data
stream.
I have this in my TICK script :
----------------
var window = 1m
var every = 1m
var data = stream
|from()
.measurement('system')
.groupBy('host')
|window()
.period(window)
.every(every)
|last('uptime')
.as('last_uptime')
----------------
"system" is my measurement in InfluxDB.
"host" is a tag value in InfluxDB.
"uptime" is a field("integer") in InflxuDB.
I use the following to mach :
----------------
var crit = lambda: "last_uptime" < 300
var critReset = lambda: "last_uptime" >= 300
----------------
If I remove the "|Last()" function than the TICK scrip stays enabled, but
gives the wrong outcome.
IE; I get alerts for all points when "uptime" is from 0 to 300.
I just want to match on the last value.
Thanks for your help
Brendan
I have the following :
Kapacitor, v1.1.1
InfluxDB, v 1.1.1
Telegraf, v1.1.2
I am having a little bit of trouble with the |last() function. (Or maybe my
understanding of it)
My TICK script gets loaded into Kapacitor with out any error.
After some time the "kapacitor show tasks" command lists the task as
"Executing:false".
I guess this is when the task has its first match on the incoming data
stream.
I have this in my TICK script :
----------------
var window = 1m
var every = 1m
var data = stream
|from()
.measurement('system')
.groupBy('host')
|window()
.period(window)
.every(every)
|last('uptime')
.as('last_uptime')
----------------
"system" is my measurement in InfluxDB.
"host" is a tag value in InfluxDB.
"uptime" is a field("integer") in InflxuDB.
I use the following to mach :
----------------
var crit = lambda: "last_uptime" < 300
var critReset = lambda: "last_uptime" >= 300
----------------
If I remove the "|Last()" function than the TICK scrip stays enabled, but
gives the wrong outcome.
IE; I get alerts for all points when "uptime" is from 0 to 300.
I just want to match on the last value.
Thanks for your help
Brendan
--
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 influxdb+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
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/1f8c74ac-fa94-4286-9720-5b230d320722%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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 influxdb+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
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/1f8c74ac-fa94-4286-9720-5b230d320722%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.