Random Project

A very good plugin

VMware-vSphere-Perl-SDK must be installed at first on the Nagios system and
hp-HPutil package must be installed on the target esxi host, for example for esxi5.5: hp-HPUtil-esxi5.5-bundle-1.6-25.zip. And with this patch it will use the up-to-date command line utility and the message about a failed massive will be much more informative:

— check_esxcli_hparray.sh 2015-02-10 16:35:14.000000000 +0300
+++ check_esxcli_hparray_new.sh 2015-02-16 13:17:53.667530088 +0300
@@ -102,12 +102,12 @@
echo “RAID OK – ($msg_ok)”
exit $exit_status
elif [ $exit_status -eq “1” ]; then
– msg_warning=`echo $check|grep -i rebuild`
+ msg_warning=`echo $check|grep -i rebuild|sed ‘s/.*Smart (.*)$/Smart 1/g’`
echo “RAID WARNING – ($msg_warning)”
exit $exit_status
elif [ $exit_status -eq “2” ]; then
– msg_critical1=`echo $check|grep -i failed`
– msg_critical2=`echo $check|grep -i recovery`
+ msg_critical1=`echo $check|grep -i failed|sed ‘s/.*Smart (.*)$/Smart 1/g’`
+ msg_critical2=`echo $check|grep -i recovery|sed ‘s/.*Smart (.*)$/Smart 1/g’`
echo “RAID CRITICAL – ($msg_critical1 $msg_critical2)”
exit $exit_status
fi
@@ -128,7 +128,7 @@
exit 0
;;
-h)
– check=`$ESXCLI -s $2 -u $4 -p $6 hpacucli cmd -q “controller slot=$8 ld all show”`
+ check=`$ESXCLI -s $2 -u $4 -p $6 hpssacli cmd -q “controller slot=$8 ld all show”`
check_raid
;;
*)