Public
Authored by Adrien Dorsaz

btrfs_device_stats munin plugin

Munin plugin to get results form btrfs device stats

This plugin depdends on python3-btrfs and was inspired by the btrfs Munin plugin packed on Debian.

Edited
btrfs_device_stats 2.58 KB
  • I've just updated the main function to replace the deprecated btrfs.utils.mounted_filesystems method with btrfs.utils.mounted_filesystem_paths as found in the 2019 release of python-btrfs.

  • The old main function was:

    def main():
        for fs in btrfs.utils.mounted_filesystems():
            devices = fs.devices()
    
            if len(sys.argv) > 1 and sys.argv[1] == 'config':
                munin_config(fs, devices)
            else:
                munin_values(fs, devices)

    I have directly updated the snippet as this doesn't change any other thing in the algorithms.

    Edited by Adrien Dorsaz
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment