Advantech ICR-3211 User Manual page 27

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

Advertisement

Send an E-mail
This script is going to send an e-mail message for when the power supply will reach the
defined threshold voltage. Firts, ensure the SNMP credentials are configured in the Configu-
ration -> Services -> SMTP configuration page.
Following items should be revised in the script:
destined e-mail address,
threshold for minimal power supply voltage,
subject and body of the e-mail ($VOLTAGE variable stands for the value of the actual
power supply voltage).
# This script monitors the supply voltage and will send an e-mail if below the
treshold.
EMAIL_TO="xxx@organization.com" # Set the destined e-mail address
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 e-mail with subject (-s) and body (-m).
email -t $EMAIL_TO -s "Power supply outage..." -m "Actual voltage is $VOLTAGE V."
SENT=1
fi
sleep 1
done
# Set the threshold voltage level
21
ICR-3211

Advertisement

Table of Contents
loading

Table of Contents