I am using Grafana 9.0.2 and since the upgrade from v8 I don’t see any difference between lines/points in the time series. The points are not connected anymore.
Here are the two options with basically the same output. Does anyone know why?
I am using Grafana 9.0.2 and since the upgrade from v8 I don’t see any difference between lines/points in the time series. The points are not connected anymore.
Here are the two options with basically the same output. Does anyone know why?
OK I just found out it’s caused by the last line |> aggregateWindow(every: v.windowPeriod, fn: mean)
but I need some aggregation, otherwise I get “too many data points” when I use large time windows.
What is the recommended way to do this kind of aggregation? I am still very confused about flux
(used SQL in Grafana 8).
depends. aggregation by minute, hour, day,months? what are your requirements.
I was using the query above because it adapted automatically to the interval which is selected in the dashboard layout, so I don’t want to hardcode it. In principle the answer to your question is simply v.windowPeriod
which is set automatically when the time interval is changed to 1 hour or 1 day etc.
but you said
You cant have your cake and eat it too
I said it was working before upgrading (the lines were connected) and now they are not
But my query looked very different since I used SQL, still, there was some aggregation so that I could display really long time intervals without reaching the maximum points to be displayed.
Are you saying that there is no way to have dynamic time windows and connected lines? I really need different line styles but if they are shown as points, the line style obviously has no effect.
ok I tried it locally and weird enough, I see your issue. what happens if you added this to the end?
|> yield(name: "mean")
but there seems to definitely be an issue as the time span reduces. bug!
and could you add this option to your aggregateWindow function ?
, createEmpty: false
And you can check this link too (there is work around to get fully connected graph) :
Ah thanks, createEmpty: false
did the trick. Do I need to yield the mean? I don’t see any effect other than the last datapoint vanishing
no in my understanding, yield is usefull for query with multiple output,
but added in simple query as a good practice