node_exporter icon indicating copy to clipboard operation
node_exporter copied to clipboard

Add a new way to filter mount points

Open erjavaskivuori opened this issue 5 months ago • 4 comments

This is a enhancement proposal to add a new way to filter mount points.

Our current use case is that we collect node_filesystem_avail_bytes metric  filtered by certain prefix on the mount point paths. However, if there are any inconsistencies in the naming, it can lead into difficulties to track all the wanted mount points.

I am proposing two alternative new ways filter mount points:

  1. Add a way for node-exporter to read file system UUIDs so that then the mount point filtering could be done based on the UUID. This would be the preferred option because the UUID is supposed to be unique and works well with LVMs and regular disks alike.

  2. Add a way for node-exporter to read file system labels so that then the mount point filtering could be done based on the label.

Do you think implementing one of these would be possible and which one you would prefer? If it would be possible, I would propose extending the filesystemCollector to include one of these filters.

erjavaskivuori avatar Aug 13 '25 12:08 erjavaskivuori

Hi @SuperQ and @discordianfish, could you kindly provide some feedback on this issue or the draft PR I have created? Thank you in advance!

erjavaskivuori avatar Sep 02 '25 08:09 erjavaskivuori

I would be very interested to see something like the proposed functionality become available.

Rozzii avatar Sep 05 '25 12:09 Rozzii

We could expose the uuids either in the existing node_disk_info metric or a filesystem specific one. Then you can use these to map to the device label in node_filesystem_avail_bytes. Would that work?

discordianfish avatar Nov 12 '25 09:11 discordianfish

Oh I see you mean filtering from collection in general. Lets conttinue on the PR

discordianfish avatar Nov 12 '25 09:11 discordianfish