Grafana 9.4.7 self hosted under Docker on ubuntu server 22.04
I have a graph of light levels which are posted to influx every minute. I am querying this in influxql to plot on grafana and aggregating every 15 mins.
This works for short time spans eg xx but for 6 months it fails because there are too many data points.
I think the answer is in the value of aggregatewindow but I need to change that according to the time range to limit the number of datapoints.
You mentioned that you are aggregating every 15 minutes. I presume you are doing this before ingesting the data into InfluxDB, because there is nothing in your query that indicates the aggregation is being done.
If all of your data exists in Influx, I would think that an aggregateWindow statement like this placed after your last filter statement would work without any errors or crashes. Note that the fn: mean could be a different function (sum, last, custom function, etc.).
It doesn’t work for queries over eg 6 months due to the number of points. It would be better to aggregate over hours or even days as the time range increases. How can I do this?
It does, but I can’t find any documentation on the units produced by something like ‘int(v: v.timeRangeStop) - int(v: v.timeRangeStart)’.
Specifically (for example), what number would result if we evaluate ‘int(v: v.timeRangeStop) - int(v: v.timeRangeStart)’ when there is 1 day between timeRangeStop and timeRangeStart?