node_exporter icon indicating copy to clipboard operation
node_exporter copied to clipboard

Add filesystem UUID based filter

Open erjavaskivuori opened this issue 4 months ago • 5 comments

Add filesystem UUID based filter to the filesystemCollector

The implementation currently only includes Linux and I would be glad to hear feedback before continuing to implement this for other OS' file system collectors.

I tried to create unit test for the buildUUIDMap function but couldn't figure out how could I create device major:minor for the fixture block device nodes that I tried to add. So currently there is no test for this feature. I have tested this locally.

Fixes #3380

erjavaskivuori avatar Aug 22 '25 06:08 erjavaskivuori

@SuperQ can we have reviews on this one?

kashifest avatar Sep 29 '25 06:09 kashifest

@SuperQ I have took over this PR and I have also re-based it. Would it be possible to get some review on this PR? I still think this PR could be beneficial for the wider community.

Rozzii avatar Oct 28 '25 11:10 Rozzii

Adding @discordianfish too, please take a look.

Rozzii avatar Oct 28 '25 12:10 Rozzii

Not completely opposed but also not convinced this is needed. You could use a wrapper script to lookup the mountpoints from the uuids and then invoke the node-exporter with the right mountpoint. My main concern is that this is a slippery slope leading to more and more ways to ignore devices. Like why don't we support ignoring by device name? By serial numbers? etc..

@SuperQ wdyt?

discordianfish avatar Nov 12 '25 09:11 discordianfish

Ah hah, see #3400 I'd say if we want to support this, we should come up with what to filter by (uuid, device etc) and figure out a consistent way to do that

discordianfish avatar Nov 12 '25 10:11 discordianfish