Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update check_snmp_raid.pl #18

Merged
merged 2 commits into from
Apr 23, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion check_snmp_raid.pl
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,8 @@ sub set_oids {
$logdrv_status_tableoid = $baseoid . ".14.1.1000.1.1.12";
$phydrv_status_tableoid = $baseoid . ".14.1.400.1.1.11";
$battery_status_tableoid = $baseoid . ".14.1.201.1.1.14"; # battery status
$phydrv_vendor_tableoid = $baseoid . ".14.1.400.1.1.6"; # adaptec drive vendor
$phydrv_product_tableoid = $baseoid . ".14.1.400.1.1.7"; # adaptec drive model

%LOGDRV_CODES = (
1 => ['unknown', 'array state is unknown', 'UNKNOWN'],
Expand Down Expand Up @@ -1150,7 +1152,7 @@ sub create_snmp_session {
# if ($PHYDRV_CODES{$code}[0] eq 'failed' || $PHYDRV_CODES{$code}[0] eq 'rebuild' || $PHYDRV_CODES{$code}[0] eq 'unconfigured_bad') {
$output_data .= ", " if $output_data;
$output_data .= "phy drv($phydrv_id) ".$PHYDRV_CODES{$code}[1];
$phd_nagios_status = $PHYDRV_CODES{$code}[1] if $phd_nagios_status ne 'CRITICAL';
$phd_nagios_status = $PHYDRV_CODES{$code}[2] if $phd_nagios_status ne 'CRITICAL';
# optionally check rate of rebuild
if ($PHYDRV_CODES{$code}[0] eq 'rebuild' && defined($opt_extrainfo)) {
my $eoid = $phydrv_rebuildstats_tableoid.'.'.$line;
Expand Down