From 3fd87515958ac59e0b718adbd7355ffe46a1e5f8 Mon Sep 17 00:00:00 2001 From: Cyberes Date: Fri, 23 Feb 2024 17:13:29 -0700 Subject: [PATCH] check_zfs_zpool: adjust log devices count --- check_zfs_zpool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_zfs_zpool.py b/check_zfs_zpool.py index 98816f5..209d35a 100755 --- a/check_zfs_zpool.py +++ b/check_zfs_zpool.py @@ -288,7 +288,7 @@ def main(args): ', '.join([*set(warn_drives)])] if not len(warn_drives) and not len(crit_drives): - out_str = ['OK', '-', f'{len(vdev_devices)} {args.check_type} devices for {args.pool_name} are healthy'] + out_str = ['OK', '-', f'{len([x for x in vdev_devices if not x["device"].startswith("mirror")])} {args.check_type} devices for {args.pool_name} are healthy'] print(*out_str) print(list_to_markdown_table(table_data, align='left', seperator='!', borders=False))