anryko/grafana-influx-dashboard

Some Grafana graphs has errros

Closed this issue · 7 comments

Hello.

I installed your dashboard into Grafana 2.1.3, but some of the graphs are giving me this error:

InfluxDB Error Response: error parsing query: aggregate function required inside the call to derivate

You can see it on the attached screenshot:
grafana

I'm using grafana-2.1.3-1.x86_64, influxdb-0.9.4.1-1.x86_64, collectd-5.5.0-1.el6.x86_64.

I'm not sure if this is a dasboard bug or some problem of my collectd+influxdb configuration.

Thank you

PetrR

Hello,

Looks like your issue is due to influxdb derivative function change in v0.9.4.1. You can get more info from grafana/grafana#2802. I will be able to fix this only after Grafana editor change is done to support this new influxdb behaviour because I don't generate query myself, just provide the data for Grafana query editor to do it for me.
As a quick fix I can only suggest you to downgrade to influxdb v0.9.3 for now.

Thanks for the issue. I will live it open and will do my best at fixing it as soon as Grafana version with the new query editor feature is released.

Thank you for explanation.
I tried the latest influxdb "influxdb-0.9.4.2-1.x86_64", but it looks like it hasn't been fixed there yet. (I'm still getting the same error like with the previous version)

I'll wait for the new influxdb release and let you know once it will start working.

Thank you

PetrR

Hey,
It's not an influxdb issue in this case. They changed derivative function behaviour intentionally. We have to wait for the new Grafana release to adapt to this influxdb change and only then I can automate this functionality in getdash script.

Hi,
After Grafana 2.5.0 release it still not playing nice with derivative function from Influxdb 0.9.4. However, I was tired of waiting and managed to apply some dirty hacks to make it work. I would appreciate if you could test it and confirm it works for you too.

xs4 commented

tested with Grafana 2.5.0 and Influxdb 0.9.4.2

It is just missing the fill(none) to be perfect. ie

diff --git a/getdash.app.js b/getdash.app.js
index c68cf98..d45e9d0 100644
--- a/getdash.app.js
+++ b/getdash.app.js
@@ -319,6 +319,8 @@ define([
         if (graphConf.math) {
             delete readyTarget.fields[0].mathExpr;
         }
+
+       readyTarget.fill = 'none';
         var queryBuilder = InfluxQueryBuilder.prototype;
         queryBuilder.target = readyTarget;
         var rawQuery = queryBuilder._buildQuery();

Without the fill none you sometimes get empty graphs.

xs4, thanks! Fixed e582fa6

Working fine...

Thank you

PetrR