From b6c223e391b84bc5bd0c5e276d4154599f269ce2 Mon Sep 17 00:00:00 2001 From: Cyberes Date: Fri, 23 Feb 2024 16:46:55 -0700 Subject: [PATCH] fix --- check_zfs_zpool.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/check_zfs_zpool.py b/check_zfs_zpool.py index f01963f..6f099bd 100755 --- a/check_zfs_zpool.py +++ b/check_zfs_zpool.py @@ -209,7 +209,7 @@ def main(args): 'value': int(float(float_to_percent(pool_status['capacity']).strip('%'))), 'warn': args.warning_free, 'crit': args.critical_free, 'min': 0, 'unit': '%' }, 'size': { - 'value': pool_status['size'], 'min': 0 + 'value': filesize(pool_status['size'], spaces=False, formatter=False), 'min': 0 }, 'fragmentation': { 'value': int(float(float_to_percent(pool_status['fragmentation']).strip('%'))), 'warn': float_to_percent(warning_frag_float).strip('%'), 'crit': float_to_percent(critical_frag_float).strip('%'), 'min': 0, 'unit': '%' @@ -221,7 +221,6 @@ def main(args): sys.exit(exit_code) elif args.check_type in ['cache', 'log']: - vdev_devices = get_vdev_info(args.pool_name, args.check_type) if not len(vdev_devices): print('UNKNOWN - no devices found')