Chronograf: Graphing counters?

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?

Thanks -

Shane O.

Shane -
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)


Thanks, @Alan_Caldera

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 -

Shane O.

Hi @shaneo, looks like the WHERE is malformed. Try now() - 1h (with the parens).

cc @Alan_Caldera

That was the trick! Thanks @jaredscheib and @Alan_Caldera !

Shane O.

1 Like