Advantech ICR-3211 User Manual page 28

Lte industrial router
Hide thumbs Also See for ICR-3211:
Table of Contents

Advertisement

Send an SNMP Trap
This script is going to send an SNMP trap for when the power supply will reach the defined
threshold voltage.
Following items should be revised in the script:
SNMP destinated IP address,
OID of the SNMP trap,
threshold for minimal power supply voltage.
# This script monitors the supply voltage and will send an SNMP trap if below the
treshold.
SNMP_IP=192.168.1.1
OID="1.2.3.4.5.6.7.8" # Set the OID
THRESHOLD=8
SENT=0
while true; do
VOLTAGE='status sys | awk '/Voltage/ { print $4 }''
if [ $THRESHOLD -lt ${VOLTAGE%.*} ]; then
SENT=0
elif [ $SENT -eq 0 ]; then
# Sending the SNMP trap
snmptrap -c public $SNMP_IP $OID s $VOLTAGE
SENT=1
fi
sleep 1
done
# Set SNMP destinated IP address
# Set the threshold voltage level
22
ICR-3211

Advertisement

Table of Contents
loading

Table of Contents