How can I build a graphical query Grafana template that returns only data with a value

I have a dashboard with a template variable for our virtual machine instances based on their host name, and the toolbar repeats a series of prefabricated graph panels (CPU, memory, etc.) based on the elements of this variable.

However, when we rotate the virtual machines, the graphite data freezes for a while, but the data is empty, so I do not want to show them in the drop-down list.

Current request

platform.collectd.*

I tried something like this to filter out those that do not have current data but return nothing in the list:

aliasByNode(maximumAbove(platform.collectd.*.cpu-0.percent-idle.value,0),2)

It seems to work only with a wildcard at the end.

Is there any way around this?

+4
source share

Source: https://habr.com/ru/post/1692330/


All Articles