I’m using Grafana with Influxdb to help me understand the performance of the application that I’m developing and so far it’s proven to be fantastic.

The one thing I’m struggling with at the moment is that I want to scale my Y axis based on the interval, since I’m counting or summing per interval, but I don’t need single pixel resolution so I would like to multiply the interval by a constant factor.

Basically I want to do something like this:

SELECT sum( value) / ($__interval_ms * 10) FROM mymeasurement WHERE $timeFilter GROUP BY time( $__interval * 10)

(actually would like to set an interval scale factor to 10 and have grafana multiply the $__interval and $__interval_ms for me)

OR alternatively with an interval template variable (although not my first choice of solution):

SELECT sum( value) / $myInterval_ms FROM mymeasurement WHERE $timeFilter GROUP BY time( $myInterval)

Neither seems to be possible?

This would also be possible if Influxdb supported multiplying interval literals but it also doesn’t seem to be the case.