InfluxDB x Grafana - Empty Entries

I have created a dashboard to display real-time memory status, but I have noticed that there are many empty entries, causing my dashboard to alternate between no data and data. Do you know why there are so many empty entries?

The resource is CPU from VMs for example, the query(influxdb) is as follows:

from(bucket: “vmware”)
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r[“vmname”] == “XXX-XXXX”)
|> filter(fn: (r) => r[“_field”] == “usage_average”)
|> filter(fn: (r) => r[“_measurement”] == “vsphere_vm_cpu”)
|> filter(fn: (r) => r[“cpu”] == “instance-total”)
|> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: true)
|> yield(name: “last”)

The dashboard has the following options:
Calculation: Last
numeric fields

Welcome @renanmsampaio

Can you share a screenshot of your dashboard in both states?


Hello Grant2,

Each block is the CPU of a server, green is now with data and gray is no data.
We have a value mapping to change the colors.

I changed to show value, and the text no data.


What happens when you remove this from your query?

Hi @renanmsampaio,
Can you try changing Calculation from Last to Last * ( Last* = Last non null value ) ?

Best regards,