Build precise queries to find exactly what you need
Press ESC to close
In case someone is interested. Not perfect, but it does the job. https://github.com/pashol/nagios-checks/blob/master/check_3par_perf
if [ $COMMAND == “check_cap_fc” ] then $CONNECTCOMMAND showpd -p -devtype FC -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 FC disks rm -f $TMPDIR/3par_$COMMAND.$INSERV.out exit 0 fi
TOTCAPFC=`cat ${TMPDIR}/3par_${COMMAND}.${INSERV}.out | tail -1 | cut -d, -f1` FREECAPFC=`cat ${TMPDIR}/3par_${COMMAND}.${INSERV}.out | tail -1 | cut -d, -f2` USEDCAPPCFC=`expr 100 – ( ( $FREECAPFC * 100 ) / $TOTCAPFC )` USEDCAPFC=$((($TOTCAPFC-$FREECAPFC))) WARNCAPFCRAW=$(($TOTCAPFC*$PCWARNINGFC/100)) CRITCAPFCRAW=$(($TOTCAPFC*$PCCRITICALFC/100))
if [ $USEDCAPPCFC -ge $PCCRITICALFC ] then echo CRITICAL! Used FC capacity = $USEDCAPPCFC% ( > $PCCRITICALFC% )|UsedSpace=$USEDCAPPCFC%;$PCWARNINGFC;$PCCRITICALFC UsedSpace=$USEDCAPFCMB;$WARNCAPFCRAW;$CRITCAPFCRAW;0;$TOTCAPFC rm -f $TMPDIR/3par_$COMMAND.$INSERV.out exit 2 else if [ $USEDCAPPCFC -ge $PCWARNINGFC ] then echo WARNING! Used FC capacity = $USEDCAPPCFC% ( > $PCWARNINGFC% )|UsedSpace=$USEDCAPPCFC%;$PCWARNINGFC;$PCCRITICALFC UsedSpace=$USEDCAPFCMB;$WARNCAPFCRAW;$CRITCAPFCRAW;0;$TOTCAPFC rm -f $TMPDIR/3par_$COMMAND.$INSERV.out exit 1 else
echo OK : Used FC capacity = $USEDCAPPCFC%|UsedSpace=$USEDCAPPCFC%;$PCWARNINGFC;$PCCRITICALFC UsedSpace=$USEDCAPFCMB;$WARNCAPFCRAW;$CRITCAPFCRAW;0;$TOTCAPFC rm -f $TMPDIR/3par_$COMMAND.$INSERV.out exit 0 fi fi fi
We’ve completely redesigned the world’s largest repository of Nagios plugins and monitoring tools. Join thousands of users sharing monitoring solutions for servers, applications, and everything in between.
Due to our redesign, all existing accounts require a password reset to access your account again.
Ready to explore 6,100+ projects and contribute to the community?
Reset Password Create Account
Happy Monitoring!