Different results on two different dashboards with same query

  • What Grafana version and what operating system are you using?
    Grafana v10.2.3

  • What are you trying to achieve?
    See same result as on my other dashboard

  • How are you trying to achieve it?
    I copy the exact same query , the only change is that I chage “r.host =~ /^$host$/” to “r.host == “Tower”” .

I also enabled in the “Time Series” visualisation option Last* that excludes null values

  • What happened?
    As shown on screenshot, every X seconds I get empty values and the graph looks different than on the other dashboard.
    Left is new dashboard, right is existing one. Both use same influxdb datasource

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

I dont get any errors

Query I use:

from(bucket: "telegraf")
    |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
    |> filter(fn: (r) => 
    r._measurement == "docker_container_mem" and
    r._field == "usage" and
    r.host =~ /^$host$/
    )
    |> map(fn: (r) => ({ _value: r._value / $cpucores, _time: r._time, _field: r.container_name }))
    |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)
    |> yield(name: "last")

They may have the same query, but they may have other different things, e. g. size, panel configuration,…

Compare panels json models to see a difference. Blind guess: they have different connect null values config:

I copied the same json from the working one over the one that doesnt work.
But the effect is the same unfortunately.
connect null values config is set to Always btw

I found out that the problem is when I select the “Stack Series” feature.
When it’s OFF, everything works. When its on Normal or 100% , it gives this garbled image.

And this image looks like this because it seems that it totally ignores the connect null values config as it shows empty datapoints resulting in the “drops”