Warm tip: This article is reproduced from serverfault.com, please click

Prometheus node exporter not reporting mounts that are owned by non-root

发布于 2020-12-01 16:57:25

running ubuntu 20 and installed prometheus node exporter. It's working, but it's only reporting the root FS mount. I have a bunch other mounts under /media that are owned by a non-root user.

Some of these aren't shown in the reported data. node_filesystem_free_bytes and node_filesystem_size_bytes in particular.

But I do see some, like this one:

node_disk_read_bytes_total{device="sdh"} 4.5708288e+07

Here's the mount details:

root@my-server:/dev# ls -l /media
total 44
drwxr-xr-x  25 gmo  gmo  4096 Nov 13 14:06 raid5
drwxr-xr-x  18 gmo  gmo  4096 Oct  5 08:48 raid5-2
root@my-server:/dev# mount |grep raid
/dev/sdh1 on /media/raid5-2 type ext4 (rw,nosuid,nodev,noexec,relatime,user)
/dev/sdf1 on /media/raid5 type ext4 (rw,nosuid,nodev,relatime,user)

Any idea why they're being ignored?

Questioner
Oggie
Viewed
0
Oggie 2020-12-04 07:32:41

Turns out the version of prometheus-node-exporter you install with ubuntu apt-get is really old. Version .18. And the most recent one right now is 1.0.1. After I installed the most recent, it started pulling the mounted disks.