prometheus / prometheus/node_exporter
Request to add label for mount point to mountstats
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 13.8k
- Forks
- 2.7k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 8
Description
Currently the labels for NFS metrics from mountstats are "export", "protocol", "mountaddr"
I'm requesting that another label be added, the mountpoint on the NFS client.
For example if /proc/self/mountstats had the following device info:
device myhostname.com:/exports/example mounted on /auto/example with fstype nfs statvers=1.1
I'd like to have a label: mountpoint: /auto/example, in addition to the label export: myhostname.com:/exports/example
It looks like this is already supported by procfs: https://github.com/prometheus/procfs/blob/master/mountstats.go#L314
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the node_exporter mountstats collector and compare its handling of /proc/self/mountstats with procfs mountstats.go, which the issue links and says already exposes the mount point. Trace how the existing export, protocol, and mountaddr labels are assembled. Done means NFS metrics also expose the client mount path as a mountpoint label.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100