Skip to content

collector/mountstats: add mountpoint label for NFS metrics#3554

Open
Vedant-Mhatre wants to merge 3 commits intoprometheus:masterfrom
Vedant-Mhatre:feat/mountstats-mountpoint-label-2097
Open

collector/mountstats: add mountpoint label for NFS metrics#3554
Vedant-Mhatre wants to merge 3 commits intoprometheus:masterfrom
Vedant-Mhatre:feat/mountstats-mountpoint-label-2097

Conversation

@Vedant-Mhatre
Copy link

@Vedant-Mhatre Vedant-Mhatre commented Feb 23, 2026

Summary

This PR adds the mountpoint label to mountstats NFS metrics so the same export mounted at different mountpoints is represented as separate series.

What changed

  • Added mountpoint to mountstats NFS label sets (labels, opLabels, translabels)
  • Included mountpoint in dedup identity for NFS mount entries
  • Passed mountpoint through metric emission paths
  • Added collector test coverage for duplicate export mounts with different mountpoints
  • Aligned collector/fixtures/proc/10/mountinfo with mountstats fixture mountpoints
  • Updated e2e golden fixtures to reflect the new mountpoint label:
    • collector/fixtures/e2e-output.txt
    • collector/fixtures/e2e-64k-page-output.txt

Why

Today, metrics are labeled by export, protocol, and mountaddr only, which can collapse visibility when the same export is mounted multiple times.
Adding mountpoint enables per-mount observability, as requested in #2097.

Testing

  • go test ./...
  • make common-check_license
  • ./end-to-end-test.sh (linux/arm64 fixture path)
  • ./end-to-end-test.sh (linux/amd64 fixture path)

Note

There is an older open PR (#2676) for this issue that appears inactive; this PR is a fresh attempt with updated test and fixture alignment.

@Vedant-Mhatre Vedant-Mhatre marked this pull request as draft February 23, 2026 21:31
Signed-off-by: Vedant-Mhatre <vedantmh@gmail.com>
Signed-off-by: Vedant-Mhatre <vedantmh@gmail.com>
@Vedant-Mhatre Vedant-Mhatre force-pushed the feat/mountstats-mountpoint-label-2097 branch from 9b9f366 to f9def67 Compare February 23, 2026 21:44
Signed-off-by: Vedant-Mhatre <vedantmh@gmail.com>
@Vedant-Mhatre Vedant-Mhatre force-pushed the feat/mountstats-mountpoint-label-2097 branch from f9def67 to c6acf97 Compare February 23, 2026 21:45
@Vedant-Mhatre Vedant-Mhatre marked this pull request as ready for review February 23, 2026 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant