0

I'm using stack grafana:6.0.1 + prometheus:v2.7.2 + grafana:6.0.1 to monitor my hosts. I have created a dashboard in Grafana to visualize metrics per monitored host and I want to dynamically display disk usage of each mount point in separate graf. So I have created variable $fsmount which is filled with mount points for selected host. Created graf which is repeated with this variable ($fsmount) is displayed so many times, how many mount points exists on the monitored host. But the graf shows no values, only "no values" message. The query looks like this disk_used_percent{job="$node",path="$fsmounts"} but the query in grafanas query inspector show this url query?query=disk_used_percent%7Bjob%3D%22holly-slave.decent.ch%22%2Cpath%3D%22%2Fhome%7C%2F%7C%2Fboot%22%7D&time=1552900713. It looks to me like the query should contain only the mount point which the graf is generated for. enter image description here enter image description here

Mr.B
  • 3
  • 4

1 Answers1

0

Tip 1:

When using varialbes & templates, the no values error should remind one to use the regex match (=~) instead of regular string match operator (=), so replace :

disk_used_percent{job="$node",path="$fsmounts"}

with

disk_used_percent{job="$node",path=~"$fsmounts"}

(In this case, Grafana pass a request like path="/home|/|/boot" to prometheus).

By doing so, one actually get the (multiple) serie(s), instead of the miss leading "no values" error.

Tip 2:

Regarding your actual problem (multiple graph inside one panel, instead of repeating the graph), I sometime notice that Grafana don't always enable repeated panels as soon as it is configured (I don't know if the bug is on my side or Grafana v5.x !).

So my tip is to try either: * reload the graph (change a variable value in the drop down menu, or fold+unfold the parent row. * reload the dashboard (save the dashboard, then actually reload the page [press F5]).

Hope this helps

Franklin Piat
  • 3,952
  • 3
  • 32
  • 45