From e72efa4415427c87093fce0f4d61e32d341d6691 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Tue, 29 May 2018 12:38:25 +0200 Subject: [PATCH] Ensure we always return a value for scan action status errors in check_zfs --- zabbix_scripts/check_zfs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zabbix_scripts/check_zfs b/zabbix_scripts/check_zfs index 356ea83..0f7b62f 100644 --- a/zabbix_scripts/check_zfs +++ b/zabbix_scripts/check_zfs @@ -96,6 +96,8 @@ sub get_zpool_errors { } $i++; } + # Ensure evey item returns something + $errors->{$_} ||= '' foreach (qw(scan action status errors)); return $errors; }