Remove trailing x for compressratio with ZoL < 0.8

tags/zabbix-agent-addons-0.2.82-1
Daniel Berteaud 5 years ago
parent e1090b125b
commit 2a0c6b2ad9
  1. 4
      zabbix_scripts/check_zfs

@ -63,6 +63,10 @@ if ($pool){
chomp; chomp;
my @parse = split /\t+/, $_; my @parse = split /\t+/, $_;
$json->{$parse[1]} = (defined $map->{$parse[2]}) ? $map->{$parse[2]} : $parse[2]; $json->{$parse[1]} = (defined $map->{$parse[2]}) ? $map->{$parse[2]} : $parse[2];
if ($parse[1] =~ m/compressratio$/){
# Remove trailing x for compressratio and refcompressratio as before 0.8.0 it can be like 1.23x
$json->{$parse[1]} =~ s/x$//;
}
} }
} elsif ($sanoidsnap){ } elsif ($sanoidsnap){
print qx($sanoid --monitor-snapshot); print qx($sanoid --monitor-snapshot);

Loading…
Cancel
Save