python-btrfs icon indicating copy to clipboard operation
python-btrfs copied to clipboard

check btrfs: support an automatic detection of all available btrfs filesystems

Open calestyo opened this issue 3 years ago • 1 comments

Hey.

It would be nice, if there was a switch that includes all available btrfs filesystems in the check, so that one doesn't have to configure each check manually if different hosts have many (different) btrfs filesystems at different mount points.

Maybe with some --exclude-fs switch that allows to exclude certain fs. That switch could then allow to specify via mountpoint or via UUID.

Not sure what the best way would be to detect all btrfs,... I mean one could of course parse /proc/self/mountinfo (but beware that its format is tricky: it has varying number of optional columns in the middle), but one would want to pick the same btrfs more than once, (which could easily happen with subvolumes and multiple mounts of these).

Cheers, Chris.

calestyo avatar Dec 15 '21 00:12 calestyo

Hi! Yes, that would be useful, good suggestion. Like, if no specific path is provided, just check all of the mounted filesystems. This is actually similar to the behaviour of the munin monitoring plugin, which also by default creates graphs for everything it finds.

There's btrfs.utils.mounted_filesystem_paths() already to list them.

knorrie avatar Dec 17 '21 09:12 knorrie