Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

Monitoring openvz resources using nagios and snmp

24 bytes added, 13:26, 20 December 2007
Fix incorect snmp error handling in nagios plugin
RET=0
DATADATA_TMP=`snmpwalk -v 3 -u $USER -l authPriv -a MD5 -A $PASS -x DES -X $PASS $HOST:$PORT .1.3.6.1.4.1.2021.51.4 \| perl -ne '/"(.*)"/ ; print "$1\n" ;'
if [ "$?" != "0" ]; then
echo "Unknown snmp error"
exit 1
fi
 
DATA=`echo "$DATA_TMP"| perl -ne '/"(.*)"/ ; print "$1\n" ;'`
if [ -f $FILE ]; then
16
edits