I’m receiving several counters from Telegraf and would like to visualize the delta between LAST() and the previous sample.
I’ve tried DERIVATIVE and SPREAD with no luck, and while DIFFERENCE looks like what I want, it’s not supported in Chronograf (or at least errors when I manually craft the query).
Any tips or nudges in the right direction?
DIFFERENCE() requires an aggregate function grouped by a time interval.
E.g. SELECT DIFFERENCE(LAST(“your_counter”)) FROM your_measure WHERE time > now - 1h GROUP BY time(1m)
Using your example as a guide, I first got an error at character 24 (got ", expected bool, string, etc.)
Stripping the quotes from that field, I get ‘invalid operation: time and influxql.BinaryExpr are not compatible’
Any additional thoughts?
Thanks again -
Hi @shaneo, looks like the
WHERE is malformed. Try
now() - 1h (with the parens).
That was the trick! Thanks @jaredscheib and @Alan_Caldera !