How can I add mountpoint to see its available and total size?

My system was configured automatically and exposed following stats:

# HELP node_filesystem_size_bytes Filesystem size in bytes.
# TYPE node_filesystem_size_bytes gauge
node_filesystem_size_bytes{device="/dev/sdb1",fstype="ext4",mountpoint="/"} 9.8429872128e+11
node_filesystem_size_bytes{device="lxcfs",fstype="fuse.lxcfs",mountpoint="/var/lib/lxcfs"} 0

Now that I have added another disk, I would like to see also /dev/md0 reported there so that I can see available and total space in array?

I’m surprised it was not added automatically. I’ve tried dpkg-reconfigure. What’s the mechanism that controls this collector?

$ mount | grep md
/dev/md0 on /mnt/storage type ext4 (rw,relatime)

How can I add /dev/md0 to node_filesystem_size_bytes ?

I already see some other devices in other stats, like its momentary speed & performance:

# HELP node_disk_io_now The number of I/Os currently in progress.
# TYPE node_disk_io_now gauge
node_disk_io_now{device="md0"} 0
node_disk_io_now{device="sda"} 1
node_disk_io_now{device="sdb"} 0
node_disk_io_now{device="sdc"} 1

But there is no available space or total space.

Thanks

Just covering a few bases, did you mount the system prior starting node_exporter or afterwards? If the latter, have you tried restarting node_exporter?

1 Like

I believe dpkg-reconfigure does that automatically.

But I’ve just tried specifically:

$ systemctl restart prometheus-node-e*

$ snap restart prometheus

Still there is no available filesystem size on /mnt/storage

There are just stats like

node_md_state{device="md0",state="active"} 1
node_disk_discard_time_seconds_total{device="md0"} 0

So it seems like stats regarding actual hardware device works, but it’s the filesystem stats which don’t…

node_filesystem_size_bytes{device="/dev/sdb1",fstype="ext4",mountpoint="/"} 9.8429872128e+11
node_filesystem_size_bytes{device="lxcfs",fstype="fuse.lxcfs",mountpoint="/var/lib/lxcfs"} 0

Is there any way to configure new mountpoints?

In general, is there a way to set mountpoints or should I report an issue on github?

I think this is something specific to node_exporter and likely a bug. So yeah, I would file an issue in that specific project

1 Like