From 9e99d0c53ed5a0f8694b84219cf10fa6183acd89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C5=A0vamberg?= Date: Tue, 26 Aug 2014 11:18:21 +0200 Subject: [PATCH 1/4] DISKUSED - add warning when volume is missing When volume isn't found, then change state to warning. --- nagios/check-netapp-ng.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nagios/check-netapp-ng.pl b/nagios/check-netapp-ng.pl index 6cc4f31..7e72064 100755 --- a/nagios/check-netapp-ng.pl +++ b/nagios/check-netapp-ng.pl @@ -597,6 +597,10 @@ if("$opt{'check_type'}" eq "TEMP") { $perf = "$$r_vol_tbl{$key}=$used\k"; } } + if ($msg =~ /^$/) { + $stat = $ERRORS{'WARNING'}; + $msg = "WARN: Missing volume $opt{'vol'} !"; + } ### SNAPSHOT ### } elsif("$opt{'check_type'}" eq "SNAPSHOT") { my @exc_list = split(',',$opt{'exclude'}); From f028b1224808e69a6c9a6dfa70b449ee92eb9bfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C5=A0vamberg?= Date: Tue, 26 Aug 2014 11:51:12 +0200 Subject: [PATCH 2/4] DISKSUMMARY - more information to performance data Add values of total, active, spare and reconstructing disks to performance data. --- nagios/check-netapp-ng.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nagios/check-netapp-ng.pl b/nagios/check-netapp-ng.pl index 7e72064..cba8256 100755 --- a/nagios/check-netapp-ng.pl +++ b/nagios/check-netapp-ng.pl @@ -669,7 +669,7 @@ if("$opt{'check_type'}" eq "TEMP") { $stat = $ERRORS{'CRITICAL'}; $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 ### } elsif("$opt{'check_type'}" eq "HA") { From 45b543a7a7a203f75f9fa64dea34451ce568b9ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C5=A0vamberg?= Date: Tue, 26 Aug 2014 12:08:52 +0200 Subject: [PATCH 3/4] UPTIME - add performance data Add uptime as performance data in seconds --- nagios/check-netapp-ng.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nagios/check-netapp-ng.pl b/nagios/check-netapp-ng.pl index cba8256..a9174cf 100755 --- a/nagios/check-netapp-ng.pl +++ b/nagios/check-netapp-ng.pl @@ -708,6 +708,8 @@ if("$opt{'check_type'}" eq "TEMP") { } elsif("$opt{'check_type'}" eq "UPTIME") { my $check = _get_oid_value($snmp_session,$snmpUpTime); $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 ### } elsif("$opt{'check_type'}" eq "CACHEAGE") { my $check = _get_oid_value($snmp_session,$snmpCacheAge); From 8c0957412be145e034842fb49fdc286e38e6d898 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C5=A0vamberg?= Date: Tue, 26 Aug 2014 12:21:29 +0200 Subject: [PATCH 4/4] Add new tested devices as comment Add IBM N6240 and FA2050 identification as tested device with this plugin. --- nagios/check-netapp-ng.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nagios/check-netapp-ng.pl b/nagios/check-netapp-ng.pl index a9174cf..75aa26c 100755 --- a/nagios/check-netapp-ng.pl +++ b/nagios/check-netapp-ng.pl @@ -21,6 +21,8 @@ ## FAS2220 ## FAS2240 ## FAS3220 +## FA2050, NetApp Release 7.3.1.1 +## IBM System Storage N6240, Data ONTAP Release 8.1.4P4 ## ## DISKSUMMARY|HA|CIFSSESSIONS| ## AUTOSUPPORTSTATUS|NFSOPS|