Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Directory
lkieffer
Hello,
I have add the following code to process hotspare policy of VNX2:
# add for VNX2
my $policy_line = 0;
open (NAVICLIOUT ,"$NAVICLI_CMD -h $opt_host hotsparepolicy -list |");
while () {
# First lets check for errors before proceeding
check_for_errors($_);
# check for policy lines
if( $_ =~ m/^Policy ID:/) {
$policy_line=1;
}
if ($policy_line == 1) {
# check for hot spare lines
if( $_ =~ m/^Unused disks for hot spares:s+(.*)$/) {
$hotspare_count=$hotspare_count+$1
}
}
# end of section
if ( $_ =~ m/^s*$/) {
$policy_line=0;
}
}
close (NAVICLIOUT);
I have add the following code to process hotspare policy of VNX2:
# add for VNX2
my $policy_line = 0;
open (NAVICLIOUT ,"$NAVICLI_CMD -h $opt_host hotsparepolicy -list |");
while () {
# First lets check for errors before proceeding
check_for_errors($_);
# check for policy lines
if( $_ =~ m/^Policy ID:/) {
$policy_line=1;
}
if ($policy_line == 1) {
# check for hot spare lines
if( $_ =~ m/^Unused disks for hot spares:s+(.*)$/) {
$hotspare_count=$hotspare_count+$1
}
}
# end of section
if ( $_ =~ m/^s*$/) {
$policy_line=0;
}
}
close (NAVICLIOUT);