prometheus / prometheus/node_exporter

Request to add label for mount point to mountstats

Open
#2,097 16 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

accepted good first issue help wanted
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.