From d8ff385691143ed3e4bfe8baba5119b14b48e9d4 Mon Sep 17 00:00:00 2001 From: Jim Salter Date: Tue, 17 Feb 2026 11:53:42 -0500 Subject: [PATCH] Change comparison from '==' to 'ne' for error checks Zpool status reports error counts with unit suffixes after the first 999 errors in any given column; as originally written, the monitor-health plugin used strictly numeric comparison checks which would error out when encountering a value like "1.09K" for checksum errors. --- sanoid | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sanoid b/sanoid index 8e0d186..a5591b9 100755 --- a/sanoid +++ b/sanoid @@ -1375,9 +1375,9 @@ sub check_zpool() { # check for io/checksum errors my @vdeverr = (); - if ($read != 0) { push @vdeverr, "read" }; - if ($write != 0) { push @vdeverr, "write" }; - if ($cksum != 0) { push @vdeverr, "cksum" }; + if ($read ne 0) { push @vdeverr, "read" }; + if ($write ne 0) { push @vdeverr, "write" }; + if ($cksum ne 0) { push @vdeverr, "cksum" }; if (scalar @vdeverr) { $dmge=$dmge . "(" . $dev . ":" . join(", ", @vdeverr) . " errors) ";