From d54a9dccd62e09c4d3d67412c3815bea3af5ebe7 Mon Sep 17 00:00:00 2001 From: Qubad786 Date: Wed, 9 Oct 2024 20:06:11 +0500 Subject: [PATCH] Grab serialized zpool status output in debug (#227) --- ixdiagnose/plugins/zfs.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ixdiagnose/plugins/zfs.py b/ixdiagnose/plugins/zfs.py index c3e0412..cb7c1e2 100644 --- a/ixdiagnose/plugins/zfs.py +++ b/ixdiagnose/plugins/zfs.py @@ -97,12 +97,20 @@ class ZFS(Plugin): ), CommandMetric('pool_history', [Command(['zpool', 'history'], 'ZFS Pool(s) History', serializable=False)]), CommandMetric('arc_summary', [Command(['arc_summary'], 'ARC Summary', serializable=False)]), + CommandMetric('pool_status_serialized', [ + Command(['zpool', 'status', '-jP', '--json-int'], 'ZFS Pool(s) Status', serializable=True) + ]), MiddlewareClientMetric('pool_query', [MiddlewareCommand('pool.query')]), MiddlewareClientMetric( 'pool_scrub_tasks', [ MiddlewareCommand('pool.scrub.query', result_key='scrub_tasks'), ] ), + MiddlewareClientMetric( + 'middleware_pool_status', [ + MiddlewareCommand('zpool.status', [{'real_paths': True}], result_key='middleware_pool_status'), + ] + ), PythonMetric('encryption_summary', encryption_summary), ] raw_metrics = [