Home Directory

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

Directory

emil

Reviews(1)
byemil, January 26, 2015
4 of 4 people found this review helpful
##Implementation for SSD Disks
##NOTE: Add PCWARNINGSSD = 80 and PCCRITICALSSD = 90 to trashold data.

if [ $COMMAND == "check_cap_ssd" ]
then
$CONNECTCOMMAND showpd -p -devtype SSD -showcols Size_MB,Free_MB -csvtable > $TMPDIR/3par_$COMMAND.$INSERV.out
if [ $? -gt 0 ]
then
echo Could not connect to InServ $INSERV
exit 3
fi

if [ `tail -1 $TMPDIR/3par_$COMMAND.$INSERV.out` = "No PDs listed" ]
then
echo No SSD disks
rm -f $TMPDIR/3par_$COMMAND.$INSERV.out
exit 0
fi

TOTCAPSSD=`cat ${TMPDIR}/3par_${COMMAND}.${INSERV}.out | tail -1 | cut -d, -f1`
FREECAPSSD=`cat ${TMPDIR}/3par_${COMMAND}.${INSERV}.out | tail -1 | cut -d, -f2`
USEDCAPPCSSD=`expr 100 - ( ( $FREECAPSSD * 100 ) / $TOTCAPSSD )`

if [ $USEDCAPPCSSD -ge $PCCRITICALSSD ]
then
echo CRITICAL! Used SSD capacity = $USEDCAPPCSSD\% ( > $PCCRITICALSSD\% )
rm -f $TMPDIR/3par_$COMMAND.$INSERV.out
exit 2
else
if [ $USEDCAPPCSSD -ge $PCWARNINGSSD ]
then
echo WARNING! Used SSD capacity = $USEDCAPPCSSD\% ( > $PCWARNINGSSD\% )
rm -f $TMPDIR/3par_$COMMAND.$INSERV.out
exit 1
else
echo OK : Used SSD capacity = $USEDCAPPCSSD\%
rm -f $TMPDIR/3par_$COMMAND.$INSERV.out
exit 0
fi
fi
fi