1
0
mirror of https://github.com/ranl/monitor-utils.git synced 2024-12-22 13:33:43 +01:00

Merge pull request #8 from svamberg/netapp_new_features

Netapp new features
This commit is contained in:
Ran Leibman 2014-08-26 14:19:28 +03:00
commit 705dc18bee

View File

@ -21,6 +21,8 @@
## FAS2220 ## FAS2220
## FAS2240 ## FAS2240
## FAS3220 ## FAS3220
## FA2050, NetApp Release 7.3.1.1
## IBM System Storage N6240, Data ONTAP Release 8.1.4P4
## ##
## DISKSUMMARY|HA|CIFSSESSIONS| ## DISKSUMMARY|HA|CIFSSESSIONS|
## AUTOSUPPORTSTATUS|NFSOPS| ## AUTOSUPPORTSTATUS|NFSOPS|
@ -597,6 +599,10 @@ if("$opt{'check_type'}" eq "TEMP") {
$perf = "$$r_vol_tbl{$key}=$used\k"; $perf = "$$r_vol_tbl{$key}=$used\k";
} }
} }
if ($msg =~ /^$/) {
$stat = $ERRORS{'WARNING'};
$msg = "WARN: Missing volume $opt{'vol'} !";
}
### SNAPSHOT ### ### SNAPSHOT ###
} elsif("$opt{'check_type'}" eq "SNAPSHOT") { } elsif("$opt{'check_type'}" eq "SNAPSHOT") {
my @exc_list = split(',',$opt{'exclude'}); my @exc_list = split(',',$opt{'exclude'});
@ -665,7 +671,7 @@ if("$opt{'check_type'}" eq "TEMP") {
$stat = $ERRORS{'CRITICAL'}; $stat = $ERRORS{'CRITICAL'};
$msg = "CRIT: $opt{'check_type'} (".$diskMessage.") Disk Summary : Total->".$diskTotal." Active->".$diskActive." Spare->".$diskSpare." Failed ->".$diskFailed. " Reconstructing ->".$diskReconstructing; $msg = "CRIT: $opt{'check_type'} (".$diskMessage.") Disk Summary : Total->".$diskTotal." Active->".$diskActive." Spare->".$diskSpare." Failed ->".$diskFailed. " Reconstructing ->".$diskReconstructing;
} }
$perf = "faileddisks=$check"; $perf = "faileddisks=$check total=$diskTotal active=$diskActive spare=$diskSpare reconstructing=$diskReconstructing";
### HA ### ### HA ###
} elsif("$opt{'check_type'}" eq "HA") { } elsif("$opt{'check_type'}" eq "HA") {
@ -704,6 +710,8 @@ if("$opt{'check_type'}" eq "TEMP") {
} elsif("$opt{'check_type'}" eq "UPTIME") { } elsif("$opt{'check_type'}" eq "UPTIME") {
my $check = _get_oid_value($snmp_session,$snmpUpTime); my $check = _get_oid_value($snmp_session,$snmpUpTime);
$msg = "$opt{'check_type'}: $check"; $msg = "$opt{'check_type'}: $check";
$check =~ m/^\s*(\d+)\s+days,\s+(\d+):(\d+):(\d+).*$/;
$perf = "uptime=" . ($1*86400 + $2*3600 + $3*60 + $4) . "s";
### CACHEAGE ### ### CACHEAGE ###
} elsif("$opt{'check_type'}" eq "CACHEAGE") { } elsif("$opt{'check_type'}" eq "CACHEAGE") {
my $check = _get_oid_value($snmp_session,$snmpCacheAge); my $check = _get_oid_value($snmp_session,$snmpCacheAge);