«

Apr 28 2017

Grafana not showing mount points containing dot in name in Disk Space plugin

I use Grafana and Prometheus to monitor my home server running on Ubuntu 16.04 x32 (Atom N270 CPU). I noticed that my external USB HDD is shown in Disk Space dashboard, but only in Mountpoint Usage graph. I only see the graph with the percentage.

The graph with the actual used / free space is empty :

In Grafana dashboard the query for the mountpoint free space is this :

node_filesystem_free{instance="$host", mountpoint="$mountpoint", fstype!~"rootfs|selinuxfs|autofs|rpc_pipefs|tmpfs"}

If I click the “Link to Graph in Prometheus” button, the Prometheus query is displayed :

node_filesystem_free{instance="eeebox", mountpoint="/mnt/USB-2\\.5TB", fstype!~"rootfs|selinuxfs|autofs|rpc_pipefs|tmpfs"}

As we can see , the dot (.) charachter is escaped with two backslashes and the query shows “no data”. If I remove them, the query is executed correctly.

node_filesystem_free{device="/dev/sdb1",fstype="ext4",instance="eeebox",job="eeebox_exporter",mountpoint="/mnt/USB-2.5TB"}

On of the solutions i’ve found is to edit the mountpoint variable and replace $mountpoint in Grafana queries with /mnt/USB2.5TB

The other solution is to replace mountpoint=”$mountpoint” with mountpoint=~“$mountpoint” in Grafana queries.

Notice the ~ character

PS : The first Grafana query, the one with the “Used space”, has 2 $mountpoint variables (Disk total – Disk free) that need to be modified.

Grafana version : 4.1.1

Prometheus version : 1.5.0

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*