Prevent heal false positive by checking two times

tags/zabbix-agent-addons-0.2.20-1 0.2.7_el5
Daniel Berteaud 9 years ago
parent f572175a65
commit f9db23c8c5
  1. 14
      zabbix_scripts/check_gluster_sudo

@ -89,8 +89,18 @@ if ($what eq 'volume'){
} }
foreach my $line (@volinfo){ foreach my $line (@volinfo){
if ($line =~ m/^Number\ of\ entries:\s+(\d+)$/ && $1 gt 0){ if ($line =~ m/^Number\ of\ entries:\s+(\d+)$/ && $1 gt 0){
print "CRITICAL: self-heal in progress ($1)"; # Lets check a second time to limit false positives
exit 1; sleep 1;
@volinfo = gluster("$gluster vol heal $volume info");
unless (scalar @volinfo){
die "Error occurred while trying to get volume heal info for $volume";
}
foreach my $line (@volinfo){
if ($line =~ m/^Number\ of\ entries:\s+(\d+)$/ && $1 gt 0){
print "CRITICAL: self-heal in progress ($1)";
exit 1;
}
}
} }
} }
@volinfo = gluster("$gluster vol heal $volume info heal-failed"); @volinfo = gluster("$gluster vol heal $volume info heal-failed");

Loading…
Cancel
Save