Forum Discussion
Thales_92506
Sep 21, 2011Nimbostratus
How do i send emails when a monitor marks a pool down?
How is this possible? Can I do this with EAV? Is it possible with logs? Thanks
Thales_92506
Sep 26, 2011Nimbostratus
Hamish, in the following code, if i put an else statement containing
email toaddress=""
fromaddress=""
body=""
would it work?
code:
remove IPv6/IPv4 compatibility prefix (LTM passes addresses in IPv6 format)
IP=`echo ${1} | sed 's/:
PORT=${2}
PIDFILE="/var/run/`basename ${0}`.${IP}_${PORT}.pid"
kill of the last instance of this monitor if hung and log current pid
if [ -f $PIDFILE ]
then
echo "EAV exceeded runtime needed to kill ${IP}:${PORT}" | logger -p local0.error
kill -9 `cat $PIDFILE` > /dev/null 2>&1
fi
echo "$$" > $PIDFILE
send request & check for expected response
curl -fNs http://${IP}:${PORT}${URI} | grep -i "${RECV}" 2>&1 > /dev/null
mark node UP if expected response was received
if [ $? -eq 0 ]
then
echo "UP"
fi
else [
email toaddress=""
fromaddress=""
body=""
]
fi
rm -f $PIDFILE
exit
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects