1 |
--- smeserver-zabbix-agent-0.1/root/var/lib/zabbix/bin/megaraid-parser.pl.megaraid_fix_raid10 2009-07-08 14:24:25.000000000 +0200 |
2 |
+++ smeserver-zabbix-agent-0.1/root/var/lib/zabbix/bin/megaraid-parser.pl 2009-07-08 14:33:00.000000000 +0200 |
3 |
@@ -111,7 +111,7 @@ |
4 |
open (LDINFO, "$megacli -LdInfo -L$ld -a$adp |") |
5 |
|| die "error: Could not execute $megacli -LdInfo -L$ld -a$adp"; |
6 |
|
7 |
- my ($size, $unit, $raidlevel, $ldpdcount, $state); |
8 |
+ my ($size, $unit, $raidlevel, $ldpdcount, $spandepth, $state); |
9 |
while (<LDINFO>) { |
10 |
if ( m/Size:\s*((\d+)(MB|GB|TB))/ ) { |
11 |
$size = $2; |
12 |
@@ -126,8 +126,11 @@ |
13 |
if ( $state ne 'Optimal' ) { |
14 |
$status = 'CRITICAL'; |
15 |
} |
16 |
- } elsif ( m/Number Of Drives:\s*(\d+)/ ) { |
17 |
- $ldpdcount = $1; |
18 |
+ } elsif ( m/Number Of Drives( per span)?:\s*(\d+)/ ) { |
19 |
+ $ldpdcount = $2; |
20 |
+ } elsif ( m/Span Depth:\s*(\d+)/ ) { |
21 |
+ $spandepth = $1; |
22 |
+ $ldpdcount = $ldpdcount * $spandepth; |
23 |
} elsif ( m/RAID Level: Primary-(\d)/ ) { |
24 |
$raidlevel = $1; |
25 |
} |