From 7d27a931f350dbfad564ff37d7f161659cf6dbc8 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 4 Jul 2018 08:11:39 +0200 Subject: [PATCH] Fix ZFS pool stats retrieval --- zabbix_scripts/check_zfs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zabbix_scripts/check_zfs b/zabbix_scripts/check_zfs index c4e4eb1..ebeabee 100644 --- a/zabbix_scripts/check_zfs +++ b/zabbix_scripts/check_zfs @@ -124,8 +124,8 @@ sub convert_suffix { sub get_zpool_stats { my $pool = shift; my $stats = {}; - return $stats unless (-e "/proc/spl/kstat/zfs/rpool/io"); - open STAT, "){ if (m/^(?\d+)\s+(?\d+)\s+(?\d+)\s+(?\d+)\s+(?\d+)\s+(?\d+)\s+(?\d+)\s+(?\d+)\s+(?\d+)\s+(?\d+)\s+(?\d+)\s+(?\d+)/){ $stats->{$_} = $+{$_} foreach (keys %+);