FS#62677 - [prometheus-node-exporter] node_filesystem_* metrics for /home are wrong

Attached to Project: Arch Linux
Opened by Kohei Suzuki (eagletmt) - Sunday, 19 May 2019, 08:53 GMT
Last edited by Jelle van der Waa (jelly) - Monday, 24 February 2020, 20:53 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jelle van der Waa (jelly)
Johannes Löthberg (demize)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

When a disk is mounted on /home, prometheus-node-exporter reports wrong metrics for /home disk because prometheus-node-exporter.service is configured with ProtectHome=yes.
I think it should be configured with ProtectHome=read-only.

Additional info:
* package version(s)
0.17.0-3

* config and/or log files etc.
Nothing.

* link to upstream bug report, if any
Nothing.

Steps to reproduce:

% mount /dev/some-disk /home
% systemctl start prometheus-node-exporter
% curl -s localhost:9100/metrics | grep node_filesystem_avail_bytes | grep 'mountpoint="/home"'
node_filesystem_avail_bytes{device="/dev/md0",fstype="ext4",mountpoint="/home"} 1.2602945536e+10 <-- This is wrong value
This task depends upon

Closed by  Jelle van der Waa (jelly)
Monday, 24 February 2020, 20:53 GMT
Reason for closing:  Implemented
Additional comments about closing:  0.18.1-4
Comment by telsch (telsch) - Sunday, 06 October 2019, 17:46 GMT
I can confirm this with latest version prometheus-node-exporter 0.18.1-2

atm i need ProtectHome=read-only as Drop-In as eagletmt said.
Comment by Jelle van der Waa (jelly) - Monday, 24 February 2020, 19:29 GMT
Thanks for the bug report, I'll have to ponder about it if this is even wanted in the Arch package.

Loading...