Handle megaraid controlers in HBO/JBOD mode (skip RAID checks)

tags/zabbix-agent-addons-0.2.108-1
Daniel Berteaud 5 years ago
parent 376db5167c
commit 0135771c7a
  1. 19
      zabbix_scripts/check_raid_megaraid_sudo

@ -125,6 +125,25 @@ ADAPTER: for ( my $adp = 0; $adp < $adapters; $adp++ ) {
} }
close LDGETNUM; close LDGETNUM;
open (CFGDSPLY, "$megacli -CfgDsply -a$adp -NoLog |")
|| die "error: Could not execute $megacli -CfgDsply -a$adp -NoLog";
while (<CFGDSPLY>) {
my $hba = 0;
my $failgrouplist = 0;
if ( m/Failed to get Disk Group list/ ) {
$failgrouplist = 1;
}
if ( m/Product Name:.*(JBOD|HBA)/ ) {
$hba = 1;
}
}
close CFGDSPLY;
if ( $hba && $failgrouplist ) {
# Controler is in HBA mode, skip it
next ADAPTER;
}
LDISK: for ( my $ld = 0; $ld < $ldnum; $ld++ ) { LDISK: for ( my $ld = 0; $ld < $ldnum; $ld++ ) {
# Get info on this particular logical drive # Get info on this particular logical drive
open (LDINFO, "$megacli -LdInfo -L$ld -a$adp -NoLog |") open (LDINFO, "$megacli -LdInfo -L$ld -a$adp -NoLog |")

Loading…
Cancel
Save