Hi,
I’m having similar issues with data stored every 5 minutes. Backend is InfluxDB. An oddity of this data gathering is that when nothing is reported for a long time many zeros are not recorded so there can be large gaps in the data in this case. I don’t think Grafana/Influx like that!
I started graphing with fill(0) and with this, when viewing short periods (last 24 hours for example), because $__interval is calculated to be less than 5 minutes I see ‘spikes’ in the graph. This can be fixed by using fill(null) and connecting the nulls.
However, the above is not a good idea when viewing longer periods when $__interval is calculated to be 5 minutes or more. This is because over longer periods when there really was no data available for my metric I see connecting lines from one point to the next (that could have been days or weeks later). This is because of the fill(null) and connecting nulls. In this case though, fill(0) works perfectly.
So to sum up: for graphing short periods fill(null) works and for long periods fill(0) does.
I can solve this by forgetting all about the $__interval value and always using 5m but this is inefficient and makes graphs over long periods look untidy.
I can solve this by creating a subquery with a 5m mean, fill(0) and then using $__interval on that which looks nice by again seems very inefficient (and also has to be done manually).
Sorry if this is a bit of a noob thing, but it does seem odd that one cannot easily achieve this. What have I missed?
Thanks,
Robin