Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Directory
genti
bygenti, September 9, 2015
I only use it to monitor the system health and for that use case it works fine.
Although I figured out, that the performance data is in an incorrect format. Between several counters you'll need to have a space to seperate. So by default the output is like this:
|SLOT-0/TEMP-1=38;;;SLOT-0/TEMP-2=26;;;SLOT-0/TEMP-3=38;;;SLOT-0/TEMP-4=23;;;FAN-1=9926;;;FAN-2=9782;;;
Correct would be:
|SLOT-0/TEMP-1=38;;; SLOT-0/TEMP-2=26;;; SLOT-0/TEMP-3=38;;; SLOT-0/TEMP-4=23;;; FAN-1=9926;;; FAN-2=9782;;;
Here's a patch, that fixed it for me:
https://github.com/pashol/nagios-checks/blob/master/check_snmp_brocade.patch
Although I figured out, that the performance data is in an incorrect format. Between several counters you'll need to have a space to seperate. So by default the output is like this:
|SLOT-0/TEMP-1=38;;;SLOT-0/TEMP-2=26;;;SLOT-0/TEMP-3=38;;;SLOT-0/TEMP-4=23;;;FAN-1=9926;;;FAN-2=9782;;;
Correct would be:
|SLOT-0/TEMP-1=38;;; SLOT-0/TEMP-2=26;;; SLOT-0/TEMP-3=38;;; SLOT-0/TEMP-4=23;;; FAN-1=9926;;; FAN-2=9782;;;
Here's a patch, that fixed it for me:
https://github.com/pashol/nagios-checks/blob/master/check_snmp_brocade.patch
bygenti, August 10, 2015
The script works perfectly well. Although, I was a bit unhappy with the output. So I changed it slightly.
It makes use of Nagios multi line output capabilities and returns all services, that are running.
https://github.com/pashol/nagios-checks/blob/master/check_snmp_win.pl
It makes use of Nagios multi line output capabilities and returns all services, that are running.
https://github.com/pashol/nagios-checks/blob/master/check_snmp_win.pl
bygenti, August 3, 2015
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
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
bygenti, July 30, 2015
I added the magic threshold adaption from check_mk for large disks to the script.
https://github.com/pashol/nagios-checks/blob/master/check_win_snmp_disk.pl
Documentation for the magic number:
https://mathias-kettner.de/checkmk_filesystems.html
(Chapter df magic number)
I also eliminated the rounding of percentages. For large disks with a narrow warning/critical levels it could potentially cause problems.
https://github.com/pashol/nagios-checks/blob/master/check_win_snmp_disk.pl
Documentation for the magic number:
https://mathias-kettner.de/checkmk_filesystems.html
(Chapter df magic number)
I also eliminated the rounding of percentages. For large disks with a narrow warning/critical levels it could potentially cause problems.