mirror of https://github.com/jimsalterjrs/sanoid
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.
This commit is contained in:
parent
74b61d149f
commit
d8ff385691
6
sanoid
6
sanoid
|
|
@ -1375,9 +1375,9 @@ sub check_zpool() {
|
||||||
# check for io/checksum errors
|
# check for io/checksum errors
|
||||||
|
|
||||||
my @vdeverr = ();
|
my @vdeverr = ();
|
||||||
if ($read != 0) { push @vdeverr, "read" };
|
if ($read ne 0) { push @vdeverr, "read" };
|
||||||
if ($write != 0) { push @vdeverr, "write" };
|
if ($write ne 0) { push @vdeverr, "write" };
|
||||||
if ($cksum != 0) { push @vdeverr, "cksum" };
|
if ($cksum ne 0) { push @vdeverr, "cksum" };
|
||||||
|
|
||||||
if (scalar @vdeverr) {
|
if (scalar @vdeverr) {
|
||||||
$dmge=$dmge . "(" . $dev . ":" . join(", ", @vdeverr) . " errors) ";
|
$dmge=$dmge . "(" . $dev . ":" . join(", ", @vdeverr) . " errors) ";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue