We use node-exporter on Kubernetes (k8s) to monitor /dev/mapper devices. Unfortunately, node-exporter can only retrieve information about a device when it is running with root privileges, as indicated by the following securityContext configuration:
securityContext:
runAsUser: 0
Without this configuration, we encounter the ‘node_filesystem_device_error’ with details like the device path, file system type (fstype), and mount point:
You can take a look at adding just the capabilities you need instead of running as root, but be aware that the node exporter does need a fair amount of privilege to do its work.
So to get the chassis/product serial numbers it would seem that I either need to chmod o+r /sys/class/dmi/id/* with a boot-time cron job (ugh) or run node_exporter as root. If anyone has a better solution, I’d love to know. I’d also love to know why this is not u+r by default.