Fix GlusterFS brick count on 3.7.x

There's a news RDMA column in gluster vol status
tags/zabbix-agent-addons-0.2.20-1 0.2.1_el5
Daniel Berteaud 10 years ago
parent 8ba8179fa0
commit 7b5acdf11e
  1. 6
      zabbix_scripts/check_gluster_sudo

@ -65,10 +65,10 @@ if ($what eq 'volume'){
} }
foreach my $line (@volinfo){ foreach my $line (@volinfo){
# Check that all bricks are online # Check that all bricks are online
if ($line =~ m/^Brick\ ([\w\.]+:\/[\w\.\/]+)\s+\d+\s+([A-Z])/){ if ($line =~ m/^Brick\ ([\w\.]+:\/[\w\.\/]+)\s+\d+(\s+\d+)?\s+([A-Z])/){
$bricksfound++; $bricksfound++;
if ($2 ne 'Y') { if ($3 ne 'Y') {
print "CRITICAL: brick status (reported $2 on $1)"; print "CRITICAL: brick status (reported $3 on $1)";
exit 1; exit 1;
} }
} }

Loading…
Cancel
Save